nezuko
a rust based async runtime you can read in an afternoon
nezuko is a small async runtime built to be understood. The goal is not to
compete with tokio - it is to make every layer of a runtime (task, waker,
executor, reactor) small enough to fit in your head.
Read the source.
Quick start
use Runtime;
Development
Everything goes through make. First time on a machine:
Day-to-day:
| command | what it does |
|---|---|
make watch |
rerun check + nextest on every save |
make fmt |
format the tree |
make clippy |
lint with -D warnings |
make test |
nextest |
make coverage |
HTML report at target/llvm-cov/html/index.html |
make bench |
Criterion, HTML report at target/criterion |
make ci |
run the full CI gate locally |
Security:
| command | what it does |
|---|---|
make audit |
RustSec advisory scan of Cargo.lock |
make deny |
advisories + licenses + banned crates + sources |
make outdated |
dependencies with newer versions available |
make machete |
unused dependencies |
Docker
Multi-stage build with cargo-chef for dep caching and sccache for
compiler-artifact caching, ending in a distroless runtime.
Git hooks
Hooks live in .githooks/ (version-controlled). make bootstrap — or
make hooks on its own — points core.hooksPath at that directory.
- pre-commit —
cargo fmt --check+cargo check(fast). - pre-push —
clippy -D warnings+nextest+ doc-tests. - commit-msg — Conventional Commits.
Bypass pre-push in a pinch: NEZUKO_SKIP_PREPUSH=1 git push.
CI
Three workflows under .github/workflows/:
- ci.yml — fmt, clippy, matrix test (Linux/macOS × stable/beta/MSRV),
docs. A single
gatejob aggregates results so branch protection needs one required check. - audit.yml —
cargo auditandcargo deny(advisories/bans/licenses/sources sharded into a matrix). Runs on push, PR, and daily cron. - release.yml — tag-triggered publish to crates.io + GitHub release with auto-generated notes.
Caching is via Swatinem/rust-cache@v2, test runner is cargo-nextest.
MSRV
The minimum supported Rust version is 1.97, enforced in CI. Bumping the MSRV is a minor-version change.
License
- MIT license (
LICENSE)