Implementation:Nautechsystems Nautilus trader Cargo Workspace Manifest
| Knowledge Sources | |
|---|---|
| Domains | Build_Tooling, Rust |
| Last Updated | 2026-02-10 08:00 GMT |
Overview
Root Cargo workspace manifest that defines all Rust crates, centralized dependencies, build profiles, and workspace-level lint configuration for NautilusTrader.
Description
The root Cargo.toml serves as the central build orchestration file for the entire Rust codebase. It defines a workspace of 40+ crates organized into three groups: core crates (analysis, backtest, common, core, data, execution, indicators, infrastructure, live, model, network, persistence, portfolio, risk, serialization, system, trading), adapter crates (architect_ax, binance, bitmex, blockchain, bybit, coinbase_intx, databento, deribit, dydx, hyperliquid, kraken, okx, sandbox, tardis), and tooling crates (cli, cryptography, pyo3, testkit). It centralizes approximately 120 workspace dependencies with pinned versions and feature flags. Six build profiles are configured: dev, debug-pyo3, test, nextest, release (with LTO and codegen-units=1), release-debugging, and bench. Comprehensive workspace-level Clippy lints are defined covering performance, style, pedantic, and security categories. The workspace version is 0.53.0 using Rust edition 2024 with MSRV 1.93.0.
Usage
This file is the entry point for all Rust compilation in the project. Running cargo build, cargo test, or cargo clippy at the repository root uses this workspace configuration. All crate-level Cargo.toml files inherit [workspace.package] metadata and [workspace.dependencies] versions from this file.
Code Reference
Source Location
- Repository: Nautechsystems_Nautilus_trader
- File: Cargo.toml
- Lines: 1-560
Signature
[workspace]
resolver = "2"
members = [
"crates",
"crates/adapters/architect_ax",
"crates/adapters/binance",
# ... 38 more crates
"crates/trading",
]
[workspace.package]
version = "0.53.0"
edition = "2024"
rust-version = "1.93.0"
authors = ["Nautech Systems <info@nautechsystems.io>"]
license = "LGPL-3.0-or-later"
[workspace.dependencies]
# ~120 centralized dependencies with pinned versions
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
[workspace.lints.clippy]
# Comprehensive lint configuration
Import
# Build entire workspace
cargo build --release
# Test entire workspace
cargo test --workspace
# Lint entire workspace
cargo clippy --workspace --all-targets
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| workspace.members | List[String] | Yes | Paths to all crates in the workspace |
| workspace.dependencies | Table | Yes | Centralized dependency versions with feature flags |
| profile.* | Table | No | Build profiles with optimization settings |
| workspace.lints | Table | No | Workspace-level Clippy and Rust lint configuration |
Outputs
| Name | Type | Description |
|---|---|---|
| target/ | Directory | Compiled artifacts for all workspace crates |
| static libraries | .a/.lib files | Static libraries for FFI linking to Cython |
| dynamic library | .so/.dylib/.dll | PyO3 extension module for Python |
Usage Examples
# Build all workspace crates in release mode
cargo build --workspace --release
# Build specific crate
cargo build -p nautilus-core --release
# Run all tests with nextest profile
cargo nextest run --workspace
# Check lints
cargo clippy --workspace --all-targets -- -D warnings
# Build with specific features
cargo build --workspace --features "high-precision,postgres"