Neutron Rust
Async web framework on Hyper and Tokio. Trie routing, 1,161 tests across 18 composable crates, and the auth, real-time, and database layers already wired up.
The backend that compiles into a binary you're not afraid of.
Stop wiring crates together.
Most Rust web projects start with Axum or Actix plus fifteen dependencies to reach feature parity with a normal framework. Neutron Rust ships with the full stack already composed — trie router, Tower-style middleware, JWT + OAuth + WebAuthn auth, Nucleus client, WebSocket and SSE, OTel tracing, and a Stripe integration — all tested across 1,161 tests and versioned together.
You import the crates you need. You don't import the ones you don't. Feature-gate everything at the Cargo level, and the binary drops features that aren't in your build.
.kv(), .vector(), .graph(), .stream(). Pool lifecycle and prepared statements handled.Real code, real handlers.
Here's a production-shaped handler with auth, validation, and a vector query in about thirty lines:
use neutron::prelude::*;
use neutron_nucleus::NucleusClient;
use serde::{Deserialize, Serialize};
#[derive(Deserialize)]
struct Query { prompt: String, k: usize }
#[derive(Serialize)]
struct Hit { id: String, score: f32, title: String }
pub async fn recommend(
_user: Authed, // JWT-validated, rejects unauthenticated
State(db): State<NucleusClient>,
Json(q): Json<Query>,
) -> Result<Json<Vec<Hit>>, ApiError> {
let embedding = embed(&q.prompt).await?;
let hits = db.vector()
.search("articles", &embedding)
.k(q.k.min(50))
.execute()
.await?;
Ok(Json(hits.into_iter()
.map(|h| Hit { id: h.id, score: h.score, title: h.title })
.collect()))
}The 18 crates, composable.
Everything is its own crate. Use what you need; the rest never touches your binary.
| Crate | What it does | Depends on |
|---|---|---|
| neutron | Core framework: router, extractors, middleware chain | hyper, tokio |
| neutron-cli | `neutron new`, `dev`, `build`, `migrate` | neutron |
| neutron-nucleus | Typed client for all 14 Nucleus data models | postgres, pgx wire |
| neutron-postgres | Plain Postgres client when you don't want Nucleus | postgres |
| neutron-oauth | OAuth2 (GitHub, Google, Discord) with PKCE | reqwest, jsonwebtoken |
| neutron-webauthn | Passkey registration and assertion (P-256 ECDSA) | ring, base64 |
| neutron-jobs | Background jobs with retries, cron, and dead-letter | neutron-nucleus |
| neutron-cache | In-memory + Nucleus KV tiered cache | neutron-nucleus |
| neutron-redis | Drop-in Redis client for teams migrating | redis |
| neutron-smtp | Outbound email with templates and dry-run mode | lettre |
| neutron-storage | S3-compatible object storage | aws-sdk-s3 |
| neutron-stripe | Stripe webhooks, subscriptions, checkout | stripe-rs |
| neutron-graphql | GraphQL server with Nucleus resolvers | async-graphql |
| neutron-grpc | gRPC service hosting alongside HTTP | tonic, prost |
| neutron-rpc | Typed client/server RPC (internal comms) | serde |
| neutron-otel | OpenTelemetry traces, metrics, logs | opentelemetry |
| neutron-inference | Model inference pipeline (CPU/GPU) | candle, tch |
| neutron-config | Layered config: env → file → CLI flags | serde, toml |
Deploy a binary. That's it.
Compile once, ship once. Cross-compile to any target; the binary is self-contained. No runtime to install, no Dockerfile to maintain, no dependency tree to audit at 3am.
FROM scratch
COPY ./target/release/myapp /myapp
EXPOSE 8080
ENTRYPOINT ["/myapp"]What it's for
High-throughput APIs where latency predictability matters. Real-time fan-out to tens of thousands of clients. Edge-compiled WASM services. Tauri desktop backends (the same framework powers Neutron Desktop). Anything where you want Rust's memory safety and throughput without building half a web framework first.
Production-grade by default
1,161 tests across 18 crates — unit, integration, property-based, and async. Every crate's public API is checked by cargo-semver-checks. Memory safety guaranteed by the borrow checker; no segfaults, no data races, no null dereferences. Release profile with LTO + codegen-units=1 lands production binaries at ~8–12 MB.
Part of a bigger system
Use Neutron Rust for the performance-sensitive services. Use Neutron TypeScript for the web, Go for concurrent microservices, Python for ML and data pipelines. Every SDK speaks the same contract and reads the same Nucleus database. You never hit a wall where the framework says no.