IoC service container and dependency injection for the rok ecosystem.
Provides a runtime type-map DI container, #[derive(Injectable)] for
auto-wiring structs, and Axum extractors Inject<T> and Bound<T>.
Quick start
use Arc;
use ;
use ;
async
let container = new;
container.singleton;
let app = new
.route
.layer;
Features
| Feature | Enables |
|---|---|
axum |
[Inject<T>] extractor |
postgres |
[Bound<T>] route-model binding (implies axum) |
macros |
#[derive(Injectable)] re-export |