Module graph
Declare imports, providers, controllers, and exports in Rust. The graph stays visible to source inspection.
· Nidus
Rust backend framework · 1.0.17

A modular Rust backend framework for explicit services: typed dependency injection, module graphs, Axum routes, Tower middleware, validation, OpenAPI, observability, testing, and installable adapters.

Starter flow
cargo install cargo-nidus --version 1.0.17
cargo nidus new hello-nidus
cd hello-nidus
cargo run
use nidus::prelude::*;
#[controller("/users")]
struct UsersController {
service: Inject<UsersService>,
}
#[module(
providers(UsersService),
controllers(UsersController)
)]
struct AppModule;
Evaluation path
Core model
Declare imports, providers, controllers, and exports in Rust. The graph stays visible to source inspection.
Register dependencies by type with singleton, transient, request-scoped, lazy, optional, and factory patterns.
Compose Axum routers, Tower layers, guards, validation pipes, OpenAPI metadata, and error envelopes.
Use CLI inspectors, TestApp, and the opt-in dashboard to verify route shape, module graph, OpenAPI output, and runtime behavior.
Framework surfaces
Lean core
Nidus does not smuggle vendor dependencies into every app. SQLx and cache support live in official crates with direct access to the underlying ecosystem clients.
nidus nidus-core nidus-http nidus-openapi nidus-validation nidus-dashboard nidus-sqlx nidus-cache cargo-nidus
Examples
The examples move from a first controller to production-shaped services, adapter wiring, and external app templates. Use them as a guided tour of the public crates before choosing your own service shape.
hello-world and launchpad-api show the first controller, module, and server loop.
realworld-api and production-api cover validation, health, metrics, guards, limits, events, and jobs.
sqlx-app, cache-app, and integrations-production show optional official crates without bloating core.
external-support-desk and external-commerce use crates.io-style manifests for app-shaped examples.
Benchmark evidence
The 1.0.12 candidate was measured against its exact 1.0.4 control plus FastAPI, Spring Boot, and Express on the same PostgreSQL-backed homelab contract. A three-repetition base matrix and declared repeatability extensions keep the comparison auditable without turning a paced workload into a capacity claim.
Median average latency across 3 measured repetitions.
75-cell base matrix plus 12 retained adaptive cells.
Every published k6 check passed across the complete campaign.
Release proof
CLI install, facade dependency, and adapter crates are separated in docs.
Request IDs, context, health, metrics, CORS, limits, timeouts, security headers, tracing.
launchpad-api, realworld-api, and dashboard-api exercise modules, validation, OpenAPI, health, metrics, events, jobs, and the runtime cockpit.
Local dry-runs prove packageability; crates.io, docs.rs, and Pages deployment stay explicit external steps.