← All notes

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

Sources

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

Permanent ID: iil:note:1ftx9z6f

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.},
}

Markdown

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.