rc-axum

Solid

Implements and reviews Axum 0.8+ APIs in Rust — routing, State, extractors, Tower middleware, typed errors, WebSockets, CORS, timeouts, and production hardening. Use when building or changing Axum backends, handlers, middleware, or real-time WS endpoints. Do not use for SvelteKit/frontends (rc-sveltekit), SQLx/Postgres data layer alone (rc-sqlx), Rust language idioms — ownership, error types, trait design (rc-rust) — or general React/Next work.

Web & Frontend 19 stars 1 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
43
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Axum 0.8+ (Rust web API) Opinionated guide for production Axum services (Tokio + Tower + Hyper). Target crate line: **axum 0.8.x** (docs verified against axum v0.8.4+). Pair with `rc-sqlx` for Postgres and `rc-sveltekit` when the front is SvelteKit. ## Core workflow 1. **Map boundaries** — routes vs domain vs infra; keep handlers thin. 2. **State** — one `AppState: Clone` (pool, config, clients); inject with `.with_state(...)`. Prefer `State<T>` over request-global `Extension` for app state. 3. **Extractors** — `Path`, `Query`, `Json`, `State`, `TypedHeader` as needed; fail early with typed errors. 4. **Middleware** — Tower `ServiceBuilder` order: errors/timeouts → tracing → CORS → auth `route_layer` where needed. 5. **Security** — bind loopback behind reverse proxy in VPS; CORS explicit origins; no secrets in logs. Read `references/security.md`. 6. **Test** — `tower::ServiceExt::oneshot` for HTTP; dedicated WS tests. Read `references/testing.md`. 7. **Lint** — `cargo fmt`, `clippy -D warnings`, release build. Read `references/lint-tooling.md`. ## Reference guide | Topic | File | Load when | | ----- | ---- | --------- | | Routing, State, extractors, errors, WS | `references/guide.md` | Implementing or refactoring handlers | | Auth, CORS, headers, hardening | `references/security.md` | Auth, public API, production deploy | | Unit/integration tests | `references/testing.md` | Writing or fixing tests | | Clippy, fmt, CI, features | `references/lint-tooling.md` | Tooling, ...

Details

Author
rodolfochicone
Repository
rodolfochicone/rc-project
Created
1 months ago
Last Updated
2 weeks ago
Language
JavaScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

axum-scaffolder

Scaffolds Axum HTTP endpoints with OpenAPI (utoipa), Tower middleware, JWT auth, rate limiting, CORS, health checks, and versioning. Axum-first: typed extractors, typed responses, compile-time route verification. Use when creating Rust REST APIs, scaffolding Axum endpoints/projects, configuring Tower middleware, or adding OpenAPI/JWT to Axum. Not when the codebase uses Actix-web — Axum-into-Actix needs manual integration not covered here.

2 Updated 1 weeks ago
michaelalber
API & Backend Solid

rc-rust

Rust as a language — ownership and lifetimes, error hierarchies with thiserror/anyhow, async with Tokio, trait design, testing, performance, clippy, and rustdoc. Use when writing or reviewing Rust code, deciding between borrowing and cloning, designing an error type, structuring async tasks and channels, or configuring lints and benchmarks. Do not use for Axum HTTP routing and middleware (rc-axum), SQLx/Postgres data access (rc-sqlx), SvelteKit (rc-sveltekit), or non-Rust languages.

19 Updated 2 weeks ago
rodolfochicone
API & Backend Solid

rc-sqlx

Implements and reviews SQLx 0.8+ with PostgreSQL in Rust — PgPool, query/query_as, bind parameters, transactions, migrations, compile-time query macros, and database tests. Use when writing or changing database access with SQLx or Postgres from Rust. Do not use for Axum HTTP routing alone (rc-axum), SvelteKit (rc-sveltekit), Rust language idioms — ownership, error types, async patterns (rc-rust) — or non-Rust ORMs.

19 Updated 2 weeks ago
rodolfochicone