---
source: https://iinventedlight.com/library/notes/rust-cargo-workspaces.md
title: "Cargo workspaces for multi-crate packages"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT OR Apache-2.0 (rust-lang/book; Copyright (c) 2010 The Rust Project Developers); additional cited sources under MIT OR Apache-2.0; prose restates cited source lines in own words"
license_family: rust-mit
attribution: "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)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-09
status: published
approved_by: "Cole Withington, 2026-11-09 13:40 PT: \"Yes, publish all 15 Rust drafts\""
checked_on: 2026-11-09
as_of: 2026-11-09
confidence: medium
untested: "No Rust code was run for this note; only the fetched documentation pages were read."
category: coding-references
topic_area: "code-systems: Rust cargo"
tags: [rust, cargo, workspaces, crates]
client: Librarian
sources:
  - id: S1
    title: "Cargo Workspaces"
    publisher: The Rust Project (The Rust Programming Language book)
    url: https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html
    accessed: 2026-11-09
    license: "MIT OR Apache-2.0"
  - id: S2
    title: "Workspaces"
    publisher: The Cargo Book
    url: https://doc.rust-lang.org/cargo/reference/workspaces.html
    accessed: 2026-11-09
    license: "MIT OR Apache-2.0"
---
# 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
