Rust backend framework · 1.0.4

Nidus

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

  • Typed DI
  • Axum routes
  • OpenAPI
  • Production defaults
  • Release 1.0.4
Nidus logo
Starter flow
cargo install cargo-nidus --version 1.0.4
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

A senior Rust engineer should know where to start in under a minute.

Core model

Framework structure without hidden runtime magic.

01

Module graph

Declare imports, providers, controllers, and exports in Rust. The graph stays visible to source inspection.

02

Typed providers

Register dependencies by type with singleton, transient, request-scoped, lazy, optional, and factory patterns.

03

HTTP boundary

Compose Axum routers, Tower layers, guards, validation pipes, OpenAPI metadata, and error envelopes.

04

Runtime proof

Use CLI inspectors and TestApp to verify route shape, module graph, OpenAPI output, and request behavior.

Framework surfaces

The 1.0 surface is broad, but not blurry.

Lean core

The facade stays narrow. Adapters opt in.

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-sqlx nidus-cache cargo-nidus

Examples

Learn the framework from runnable services.

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.

View all examples

Start small

hello-world and launchpad-api show the first controller, module, and server loop.

Build real services

realworld-api and production-api cover validation, health, metrics, guards, limits, events, and jobs.

Add adapters

sqlx-app, cache-app, and integrations-production show optional official crates without bloating core.

Copy from outside

external-support-desk and external-commerce use crates.io-style manifests for app-shaped examples.

Release proof

Trust comes from bounded claims.

Install path

CLI install, facade dependency, and adapter crates are separated in docs.

Runtime defaults

Request IDs, context, health, metrics, CORS, limits, timeouts, security headers, tracing.

Examples

launchpad-api and realworld-api exercise modules, validation, OpenAPI, health, metrics, events, and jobs.

Release boundary

Local dry-runs prove packageability; crates.io, docs.rs, and Pages deployment stay explicit external steps.