← Rust Programming learning path
Rust Programming · Module 10 of 10

Cargo, testing and real projects

Use crates, tests and build real Rust apps.

📖 Key ideas

  1. Add crates in Cargo.toml or with cargo add serde.
  2. Tests: #[test] functions; run cargo test.
  3. cargo clippy lints; cargo fmt formats.
  4. Popular crates: serde (JSON), tokio, axum (web), clap (CLIs).
  5. cargo build --release for optimised binaries.
💡 Real-life example: Cargo is a project manager who orders parts, assembles, tests and ships your product.
Cargo.tomlProject manifest
#[test]Marks a test function
clippyRust linter
serdeSerialisation framework