Skip to main content

Nakago (中子)

A lightweight Rust framework for sharp services

Nakago Logo

A Flexible Foundation

Nakago provides a flexible foundation for building sharp and performant services in Rust. It wraps existing tools in the Tokio ecosystem and beyond, making it easy to bring powerful libraries like Axum, SeaORM, and Async-GraphQL together in a configurable and easily testable way.

Crates.io Docs.rs CI Coverage Status Rust Tokio Axum

logistics

Dependency Injection

Nakago is built around a fully async dependency injection system based on Any from the Rust standard library, and Shared Futures that allow multiple threads to await the same async dependency Provider.

Application Lifecycle

Nakago provides a simple and flexible application lifecycle that defines events that you can react to with Hooks. Load dependencies and config, initialize services, and start your application with the context you need for each entry point.

Comprehensive Testing

Easily swap in mock dependencies for unit testing to isolate and exercise individual components. Put everything together and validate your solution with realistic integration tests that can be automatically executed in CI for each change.

Etymology

Nakago (中子) is a Japanese word meaning "core", or less commonly the "middle of a nest of boxes". It often refers to the tang of a Japanese katana - the foundation of the hilt and the mechanism through which a sword is wielded. The nakago must be sound and resilient, allowing the holder to guide the blade with confidence.

頑張ってください!