Crate Reference

The Neutron Rust ecosystem is organized as a Cargo workspace with feature-gated crates. Use only what you need.

Core

neutron

The main framework crate. Three feature tiers:

# Minimal — router + extractors only
neutron = { version = "0.1", default-features = false }

# Web — standard API features
neutron = { version = "0.1", features = ["web"] }

# Full — everything (default)
neutron = "0.1"

Includes: Router, extractors (Path, Query, Json, Form, State, Extension), middleware chain, HTTP/1.1 + HTTP/2, TLS, graceful shutdown.

neutron-cli

CLI for project scaffolding and development:

neutron-rs new my-app          # Scaffold project
neutron-rs dev --port 3000     # Dev server with auto-restart
neutron-rs build               # Release build
neutron-rs routes              # List routes
neutron-rs check               # Fast validation

Data & Caching

neutron-cache

Tiered L1 (in-process) + L2 (Redis) cache:

neutron-cache = "0.1"                          # L1 only
neutron-cache = { version = "0.1", features = ["redis"] }  # L1 + L2

neutron-redis

Redis integration for sessions, rate limiting, and HTTP caching:

neutron-redis = "0.1"

Authentication

neutron-oauth

OAuth2/OIDC authorization code flow with PKCE:

neutron-oauth = "0.1"

Built-in providers: GitHub, Google, custom. Handlers: oauth_redirect_handler, oauth_callback_handler.

neutron-webauthn

WebAuthn/FIDO2 passkey authentication:

neutron-webauthn = "0.1"

P-256 ECDSA signature verification for passwordless login.

Backend Services

neutron-jobs

Background job queue with cron scheduling:

neutron-jobs = "0.1"                              # In-memory queue
neutron-jobs = { version = "0.1", features = ["redis"] }      # Redis backend
neutron-jobs = { version = "0.1", features = ["postgres"] }   # PostgreSQL backend

neutron-graphql

GraphQL HTTP transport with WebSocket subscriptions:

neutron-graphql = "0.1"

Observability

neutron-otel

OpenTelemetry OTLP/JSON tracing:

neutron-otel = "0.1"

Distributed tracing with trace IDs, span propagation, and JSON export.

Integrations

neutron-storage

S3-compatible object storage (AWS S3, Cloudflare R2, GCS):

neutron-storage = "0.1"

SigV4 request signing included.

neutron-smtp

Transactional email via SMTP:

neutron-smtp = "0.1"

Built on lettre.

neutron-stripe

Stripe payments and webhook verification:

neutron-stripe = "0.1"

HMAC-SHA256 webhook signature validation, payment intent handling.

Dependency Graph

neutron (core)
├── tokio, hyper, http, bytes, serde

neutron-cache
├── (optional: redis)

neutron-redis
├── neutron, redis, tokio

neutron-oauth
├── neutron, rustls, hmac, sha2

neutron-webauthn
├── serde, sha2, rand, p256

neutron-jobs
├── neutron, tokio, serde
├── (optional: redis, tokio-postgres)

neutron-graphql
├── neutron, fastwebsockets, serde

neutron-otel
├── tokio, tracing, serde_json

neutron-storage
├── sha2, hmac, rustls

neutron-smtp
├── lettre, tokio

neutron-stripe
├── hmac, sha2, serde