Rust from Zero
learn Rust by building rune — a real CLI password manager with encrypted vaults and git-based sync.
ownership, borrowing, lifetimes, traits, and the type system — all through a project you'll actually use. by lesson 18, your password manager works on your laptop.

Learning Rust
- 01
Introduction
freewhat rune is, why Rust is the right tool for building it, and how this book connects to your Go, OS, and DSA foundations
- 02
A Quick Look at Rust
freehow variables, mutability, functions, and ownership work in Rust, and how to read compiler errors as guidance instead of frustration
The Solo Vault
- 03
Your First Binary
freehow to create a Rust CLI with Cargo and clap, set up subcommands, and read the master password securely from stdin
- 04
Modeling the Vault
freehow to design the vault data model with structs and serde, serialize to JSON, and reason about ownership of collections
- 05
Encryption
freehow to encrypt the vault with AES-256-GCM, derive keys with argon2, and leverage Rust's deterministic destruction to zeroize secrets from memory
- 06
File I/O and Error Handling
freehow to save and load the encrypted vault, handle missing files and wrong passwords gracefully with Result and thiserror
- 07
CRUD and the Borrow Checker
voyagehow to implement add, get, list, remove, and edit operations while satisfying the borrow checker's rules on mutable and immutable references
- 08
The eh Command and Masking
voyagehow to implement the eh command for partial password reveal, handle UTF-8 string slicing safely, and prevent password length information leakage
- 09
Password Generation
voyagehow to generate secure random passwords with configurable rules, copy to clipboard with auto-clear, and use traits, closures, and Option
- 10
Oh No, Someone Is at My Laptop
voyagehow to discover and fix a real security flaw by adding master password sessions with TTL and re-authentication
- 11
Configuration and Multiple Vaults
voyagehow to parse TOML configuration, manage multiple named vaults, and use the builder pattern for flexible construction
- 12
Git Storage and Sync
voyagehow to implement git-based vault sync with auto-commit, push/pull, and conflict detection using trait objects for pluggable storage backends
The Web Layer
- 13
The Web Server
voyagehow to add an axum web server alongside the CLI, handle async Rust with tokio, and share state safely with Arc<Mutex<>>
- 14
Database and SQLx
voyagehow to use SQLx for compile-time checked SQL queries against PostgreSQL, manage connection pools, and run migrations
- 15
Authentication
voyagehow to implement email/password authentication with argon2 hashing, build axum middleware for protected routes, and use the newtype pattern
- 16
Multi-User and Key Exchange
voyagehow to implement X25519 key exchange for vault sharing between users, and apply generics, trait bounds, and lifetime annotations to crypto contexts
Ship It
- 17
Testing
voyagehow to write unit tests for crypto, integration tests for vault operations, and use property-based testing with proptest to fuzz encryption roundtrips
- 18
Polish and Release
voyagehow to add shell completions and JSON output, cross-compile for multiple platforms, and optimize release builds with LTO