Rust Programming
Curriculum hub for the Rust HOW-TO series β ownership model, learning path, concept map, and companion demo project
Rust Programming
Cross-source synthesis of the CLAW-00 Rust HOW-TO series β a structured curriculum from installation through a working CLI application. This page is the entry point; individual lessons live in linked how-tos. Updated when new articles are added to the series.
Overview
Rust is a systems programming language built around a single idea: memory safety without garbage collection. The compiler enforces ownership and borrowing rules at compile time β if it compiles, common memory bugs (use-after-free, data races) are ruled out.
In this monorepo, Rust appears in two places:
- Wiki tutorials β step-by-step how-tos under
content/wiki/howto-rust-* - Companion code β
rust/rust-concepts-demo/, a task manager CLI demonstrating the core concepts
Unlike AI research concepts in this wiki, Rust knowledge here is a stable curriculum, not an evolving research synthesis. The concept page maps the learning path; the how-tos teach the details.
The ownership model (central idea)
Most languages choose one of:
| Approach | Examples | Trade-off |
|---|---|---|
| Garbage collection | Python, Java, Go | Easy, but runtime pauses |
| Manual memory | C, C++ | Fast, but error-prone |
| Ownership | Rust | No GC, no manual free β compiler enforces rules |
Rust's three ownership rules:
- Each value has exactly one owner
- When the owner goes out of scope, the value is dropped
- Values can be borrowed (
&T,&mut T) but only one mutable borrow at a time
Everything else in Rust β collections, error handling, traits β builds on these rules.
See Howto Rust Ownership Borrowing for the full tutorial.
Learning path
Follow this order for the core track. Cargo and structs can branch once basics are solid.
| Step | Article | What you learn |
|---|---|---|
| 1 | Howto Install Rust Linux | rustup, rustc, cargo, build tools |
| 2 | Howto Rust Getting Started | First program, compilation, project layout |
| 3 | Howto Rust Functions Control Flow | Functions, if/match, loops |
| 4 | Howto Rust Ownership Borrowing | Moves, borrows, lifetimes intro |
| 5 | Howto Rust Collections | Vec, String, HashMap + ownership |
| 6 | Howto Rust Error Handling | Result, Option, ? operator |
| 7 | Howto Rust Structs Traits | Custom types, impl, traits |
| β | Howto Cargo Package Management | Dependencies, workspaces, crates.io (anytime after step 1) |
| 8 | Howto Rust Concepts Demo | Integrate steps 1β6 in a real CLI app |
Capstone: After steps 1β6, run the companion demo:
cd rust/rust-concepts-demo
cargo run
Concept map
How the core ideas connect:
Ownership β Collections
Vec, String, and HashMap store data on the heap and follow ownership rules. Pushing to a Vec may move values; iterating often uses borrows (&item).
Ownership β Error handling
Result<T, E> and Option<T> are enums that own their payloads. The ? operator propagates errors while respecting ownership transfers.
Functions β Control flow β Pattern matching
match is Rust's primary branching tool and appears everywhere β especially with Result and Option.
β Howto Rust Functions Control Flow
Structs & traits β Real abstractions
Structs define data; traits define behaviour (like interfaces). impl blocks attach methods; derive macros auto-implement common traits (Debug, Clone).
Demo β All of the above
The task manager CLI in rust/rust-concepts-demo/ maps concepts to modules:
| Module | Concepts |
|---|---|
main.rs | Functions, match, user input |
task.rs | Structs, Display trait, ownership in structs |
task_manager.rs | Vec, HashMap, borrowing |
storage.rs | File I/O, Result, ? |
demo.rs | Standalone concept walkthroughs |
Tooling
| Tool | Role |
|---|---|
| rustup | Install and manage Rust versions |
| rustc | Compiler |
| cargo | Build, test, dependencies, publish |
Cargo is the everyday interface β you rarely invoke rustc directly after the first lesson.
β Howto Cargo Package Management
When to reach for Rust
Rust fits well when you need:
- Performance without GC pauses (CLIs, services, embedded)
- Memory safety in systems code (replacing C/C++ components)
- Concurrency with compile-time data-race prevention
- Reliable tooling β
cargo test,cargo clippyfrom day one
In da-project-claw, Rust demonstrates language fundamentals; the journal and agent stack primarily use Python and TypeScript.
Series how-tos (full list)
| Article | Summary |
|---|---|
| Howto Install Rust Linux | Install via rustup on Linux |
| Howto Rust Getting Started | First programs, rustc vs cargo |
| Howto Rust Functions Control Flow | Functions, loops, match |
| Howto Rust Ownership Borrowing | Ownership, moves, borrowing |
| Howto Rust Collections | Vec, String, HashMap |
| Howto Rust Error Handling | Result, Option, error propagation |
| Howto Rust Structs Traits | Structs, impl, traits |
| Howto Cargo Package Management | Cargo workflows |
| Howto Rust Concepts Demo | Task manager capstone |
Planned extensions
Howto Rust Structs Traits references Generics & Lifetimes as a future article. When published, this concept page and the learning path should be updated.
Related content
- Companion repo: rust/rust-concepts-demo
- Monorepo layout: Mar 20, 2026 (Day One β stack-based directory structure)
Link map
Solid arrows: links from this page. Dashed arrows: pages that link here.