Skip to content
masterclass Buddy

Rust · Concept

Modules and crates

Rust compiles code in units called crates. A package managed by Cargo can contain binary crates and optionally one library crate.

Last updated

Syntax

fn main() { /* executable crate entry point */ }

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • modules
  • Cargo
  • binary crate
  • library crate
  • workspaces

Source: Packages and Crates - The Rust Programming Language. Checked 2026-11-03.