Back to Developer Roadmap

Code Organization and Namespacing

src/data/roadmaps/rust/content/code-organization--namespacing@c_SdccEXEJyh4ymWzvCeX.md

4.0645 B
Original Source

Code Organization and Namespacing

Rust organizes code through modules (mod) for grouping related functionality and crates (binary/library projects). Modules provide namespacing and can be nested. Crates are compilation units with a root file (main.rs or lib.rs) forming the module tree for libraries or executables.

Visit the following resources to learn more: