Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Eventual Inc Daft Cargo Build Configuration

From Leeroopedia


Knowledge Sources
Domains Build_System, Rust_Toolchain
Last Updated 2026-02-08 14:00 GMT

Overview

Concrete tool for defining the Rust workspace structure, crate dependencies, feature flags, and build profiles for the Daft query engine.

Description

The Cargo.toml at the repository root serves as the Cargo workspace manifest for the Daft project. It declares approximately 55 internal crate members (under `src/`), defines workspace-wide dependency versions for over 80 external crates, configures the PyO3 `python` feature flag that enables the Rust-to-Python bridge, and specifies multiple build profiles (`dev`, `release-lto`, `dev-bench`, `bench`, `test`). It also patches upstream crates `arrow2` and `parquet-format-safe` with local or forked versions.

Usage

Consult this file when adding new Rust crates to the workspace, upgrading dependency versions, modifying build profiles, or understanding the full set of Rust sub-crates that compose the Daft engine. It is the authoritative source for workspace dependency resolution.

Code Reference

Source Location

Signature

[package]
name = "daft"
version = "0.3.0-dev0"
edition = "2024"
publish = false

[lib]
crate-type = ["cdylib"]
name = "daft"

[features]
python = [
  "dep:pyo3",
  "dep:pyo3-log",
  # ... sub-crate python features
]

[workspace]
members = [
  "src/arrow2",
  "src/common/daft-config",
  "src/daft-core",
  # ... ~55 members total
]

Import

# Not imported directly; consumed by the Cargo build system
cargo build --release
# Or via maturin for the Python extension:
maturin develop --release

I/O Contract

Inputs

Name Type Required Description
workspace members Crate paths Yes Local crate directories under `src/`
workspace.dependencies Version specs Yes Shared dependency versions for all workspace crates
features.python Feature list No Enables PyO3 Python bindings when building via maturin
patch.crates-io Crate overrides No Local or forked replacements for upstream crates

Outputs

Name Type Description
libdaft.so / daft.pyd cdylib Compiled shared library loaded by Python as the `daft.daft` native module
Cargo.lock Lock file Exact resolved dependency versions for reproducible builds

Usage Examples

Build the Python Extension

# Build with maturin (activates the "python" feature automatically)
make build

# Or directly:
maturin develop --release

Add a New Workspace Crate

# 1. Add to [workspace] members
[workspace]
members = [
  # ... existing members ...
  "src/daft-new-crate",
]

# 2. Add to [dependencies] if the root crate needs it
[dependencies]
daft-new-crate = {path = "src/daft-new-crate", default-features = false}

# 3. If it has Python bindings, add to [features] python list
[features]
python = [
  # ... existing features ...
  "daft-new-crate/python",
]

Semantic Links

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment