Search across all documentation pages
11 pages in this section.
How Rust's privacy model, compilation units, and workspaces fit together - and the mental model for organizing code from a single file to a monorepo.
Learn Rust module basics with 7 examples, covering inline, file, and nested modules, pub visibility, use imports, and mod.rs usage.
Understand Rust's visibility and privacy controls. Learn to use pub, pub(crate), and pub(super) to encapsulate code and manage API exposure.
Learn how to use Rust's use keyword to manage paths, re-export items, and reduce noise in your code. Explore glob imports and common pitfalls.
Learn how Rust packages organize library and binary crates. Understand Cargo.toml configuration, common pitfalls, and alternatives for structuring your projects.
Learn how Cargo workspaces organize multiple Rust packages into a monorepo, share dependencies, and ensure consistent builds.
Learn to use Cargo features to toggle optional dependencies and conditionally compile code paths for Rust projects, including best practices and common pitfalls.
Learn to structure Rust projects effectively, organizing binaries, libraries, and tests to scale your codebase and avoid circular dependencies.
Learn best practices for designing Rust modules and crates, including module layout, visibility, workspace management, and public API considerations.
A single-page roundup of every highlight bullet from the 10 pages in the Modules & Crates section, grouped by source page so you can scan all 57 takeaways without opening each article individually.