Rust · Project-First
You know some Rust — maybe you’ve done the Book, written minigrep, even poked at Solana. But there’s a
wall between following a tutorial and building a real thing from a blank cargo new. This playbook
is built to walk you through that wall: you learn Rust by shipping mini-projects, and every concept
is introduced at the exact moment a project needs it — never a wall of theory up front.
The thread on every page: what does building this force you to understand — and what is Rust’s compiler protecting you from?
Every project is a real, runnable crate in the companion code/ workspace — you build it, run it,
break it, and fix it. Phase 1 (Web2) is below. Phase 2 then builds three mini-blockchains —
Bitcoin → Ethereum → Solana — to understand what problem each chain actually solved, ending at a
bridge into real Anchor development.
Orientation
Project 1 · logwise — A CLI Tool · Days 1–3
Build a real command-line log/CSV analyzer. Learn ownership & borrowing, structs/enums, Result/?,
modules, and tests — by needing them.
Project 2 · kvlite — A Key-Value Store · Days 4–7
Build a mini-Redis. Learn traits, generics, lifetimes, iterators, custom errors, file persistence, and
real concurrency (Arc/Mutex, channels) — then put it behind a TCP server.
Project 3 · apilite — An Async Web API · Days 8–11
Build a production-shaped REST API with axum + sqlx. Learn async/tokio, serde, layered error
handling, middleware, tracing, integration tests, and Docker.
Project 4 · askr — AI in Rust · Days 12–15
Build an AI CLI on the Claude API: streaming, a tiny RAG (embeddings + vector search), then harden it (CI, profiling) and bridge into Phase 2.
Phase 2 · Days 16–30 — Web3: build BTC → ETH → SOL
Section titled “Phase 2 · Days 16–30 — Web3: build BTC → ETH → SOL”Build three mini-blockchains from scratch — each a runnable crate — to understand what problem each chain actually solved, ending at a bridge into real Solana/Anchor development.
Project 5 · btcmini — Bitcoin Mini-Chain (UTXO + PoW) · Days 16–20
Blocks & double-SHA-256, the UTXO set, secp256k1 keys/signatures, Proof of Work & the longest chain,
and a std::net P2P node that syncs two peers.
Project 6 · ethmini — Ethereum Mini-Chain (Accounts + VM) · Days 21–25
The account/state model vs UTXO, a state root, a minimal stack VM with opcodes and gas, and a deployable counter contract.
Project 7 · solmini — Solana Mini-Chain (PoH + Parallel) · Days 26–30
A Proof-of-History clock, Solana’s account model, a parallel non-conflicting-tx executor, and a Day-30 synthesis bridging into your real Anchor work.