Cargo workspaces for multi-crate packages
Answer: Workspaces group packages that share one Cargo.lock and one output directory. Members are the packages managed together in that workspace.
Members
Add a [workspace] section so you can list members. Packages in a workspace share the same Cargo.lock file at the root.
Claims
- id: C1 claim: A workspace is a set of packages that share Cargo.lock and output directory. source: S1 evidence: "A workspace is a set of packages that share the same Cargo.lock and output directory."
- id: C2 claim: A [workspace] section lets you add members to the workspace. source: S1 evidence: "[workspace] section that will allow us to add members to the workspace."
- id: C3 claim: A workspace is a collection of one or more packages. source: S2 evidence: "A workspace is a collection of one or more packages, called workspace members , that"
Sources
- [S1] Cargo Workspaces. The Rust Project (The Rust Programming Language book). https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html . License: MIT OR Apache-2.0. Accessed 2026-11-09.
- [S2] Workspaces. The Cargo Book. https://doc.rust-lang.org/cargo/reference/workspaces.html . License: MIT OR Apache-2.0. Accessed 2026-11-09.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources and notices: The Rust Programming Language book (rust-lang/book): Copyright (c) 2010 The Rust Project Developers; MIT OR Apache-2.0, used under MIT (https://github.com/rust-lang/book/blob/main/LICENSE-MIT). The Cargo Book (rust-lang/cargo): its MIT licence file names no copyright holder; MIT OR Apache-2.0, used under MIT (https://github.com/rust-lang/cargo/blob/master/LICENSE-MIT). Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: The Rust Project (The Rust Programming Language book), Cargo Workspaces, MIT OR Apache-2.0; The Cargo Book, Workspaces, MIT OR Apache-2.0. Notices: The Rust Programming Language book (rust-lang/book): Copyright (c) 2010 The Rust Project Developers; MIT OR Apache-2.0, used under MIT (https://github.com/rust-lang/book/blob/main/LICENSE-MIT). The Cargo Book (rust-lang/cargo): its MIT licence file names no copyright holder; MIT OR Apache-2.0, used under MIT (https://github.com/rust-lang/cargo/blob/master/LICENSE-MIT).
Cite this
iinventedlight. 2026. "Cargo workspaces for multi-crate packages." iinventedlight Library, iil:note:1ftx9z6f, version of 2026-11-09. https://iinventedlight.com/library/notes/rust-cargo-workspaces/. License: CC-BY-4.0.
@misc{iil_note_1ftx9z6f,
author = {{iinventedlight}},
title = {{Cargo workspaces for multi-crate packages}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-09},
url = {https://iinventedlight.com/library/notes/rust-cargo-workspaces/},
note = {Permanent ID iil:note:1ftx9z6f. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/rust-cargo-workspaces.md.