A modular backend framework built from scratch in Rust. Custom async runtime, HTTP server, DI container, and module system — zero third-party async runtime dependencies.
Building production Rust backends shouldn't require gluing together a dozen unrelated crates.
Tokio dominates the ecosystem. Your entire dependency tree locks to one runtime with its own opinions on threading, I/O, and scheduling.
Rust has great language primitives but no standard way to organize modules, manage lifecycles, or wire dependencies at the application level.
HTTP server from one crate, DB from another, config from a third. Different error types, different patterns, different upgrade cycles.
Everything you need, nothing you don't. Each layer built from scratch for cohesion.
Custom executor with epoll/kqueue/IOCP, work-stealing scheduler, timer wheel, and async networking.
Zero-copy HTTP/1.1 parser, router with path params, keep-alive, chunked transfer encoding.
Compile-time dependency injection. Missing deps are compile errors, not runtime panics.
Lifecycle management with dependency graphs, proof-witness pattern, deterministic boot order.
PostgreSQL wire protocol client, connection pool, query builder, migrations — no ORM bloat.
Structured logging, tracing spans, lock-free metrics (counters, gauges, histograms), health checks.
TOML-based with profile overlays (dev/staging/prod), env var overrides, per-module scoping.
#[derive(Module)], #[derive(Component)], #[moduvex::main] — less boilerplate.
Get running in under 10 lines.
# Cargo.toml [dependencies] moduvex-starter-web = "0.1"
use moduvex_starter_web::prelude::*; #[moduvex::main] async fn main() { info!("Starting server"); Moduvex::new() .module::<HelloModule>() .run() .await; }
A layered workspace where each crate has a clear responsibility.
10 focused crates, each with a single responsibility.
| Crate | Description |
|---|---|
moduvex-runtime |
Custom async runtime — executor, reactor, timers, networking, sync primitives |
moduvex-http |
HTTP/1.1 server — zero-copy parser, router, response builder, keep-alive |
moduvex-core |
Framework core — DI container, module system, lifecycle engine, error types |
moduvex-macros |
Proc macros — #[derive(Module)], #[moduvex::main], and more |
moduvex-config |
Typed TOML config with profiles, env var overrides, per-module scoping |
moduvex-db |
PostgreSQL client — wire protocol, connection pool, query builder, migrations |
moduvex-observe |
Observability — structured logging, tracing, lock-free metrics, health checks |
moduvex-starter-web |
Web starter — bundles runtime + HTTP + core + config + observe |
moduvex-starter-data |
Data starter — bundles runtime + DB + core + config |
moduvex |
Umbrella crate — re-exports everything with feature flags (web, data, full) |