Welcome! This challenge helps you learn Rust by building a new mini-API every day using Axum, one concept at a time.
- Day 1: Hello World API (GET
/) - Day 2: Path Parameters (GET
/hello/:name) - Day 3: Extractor: Query Params (GET
/sum?a=1&b=2) - Day 4: Extractor: JSON Body (POST
/echo) - Day 5: Multiple REST Methods (GET, POST, PUT, DELETE
/item) - Day 6: Return Different Response Types (Plain Text, JSON, Custom Status)
- Day 7: Axum Router Nesting and Route Grouping
- Day 8: Logging middleware (
tower-http) - Day 9: Enable CORS for Frontend Access
- Day 10: Rate Limiting (Basic Token Bucket or Counter)
- Day 11: Custom Error Types and Global Error Handler
- Day 12: JWT Authentication (Mock, Header Parsing)
- Day 13: Session With Cookies (or Local State)
- Day 14: Load Environment Variables (
dotenvy)
- Day 15: SQLite Integration with
sqlx - Day 16: PostgreSQL Example
- Day 17: Redis Visit Counter
- Day 18: File Upload API
- Day 19: Serve Static Files (
/static/logo.png) - Day 20: Shared Global State with
Arc<Mutex<T>> - Day 21: Current Timestamp API
- Day 22: JSON → CSV Converter API
- Day 23: Image Resize API
- Day 24: PDF Metadata Extractor
- Day 25: Async Background Task
- Day 26: Unit Test a Handler
- Day 27: Generate Swagger (OpenAPI)
- Day 28: Dockerize the API
- Day 29: Freestyle Day – Build your own
- Day 30: Deploy to Fly.io or Render idea!
axum,tokio,tower,tower-httpserde,serde_json,uuidsqlx,sea-orm,redisdotenvy,utoipa
- Use
cargo new day_XXto start fresh daily. - Use
cargo add <package>to add package dependencies to Cargo.toml - Run
cargo install cargo-watchand usecargo watch -x runto live-reload during dev. - Use
curlorhttpieto test quickly. - Feel free to mix in your own ideas!
Happy hacking and welcome to the Rustacean life 🦀🔥