Skip to main content

Crate arcly_http

Crate arcly_http 

Source
Expand description

arcly-http — NestJS ergonomics meets Rust safety & speed.

This is the facade crate: it re-exports the always-compiled arcly-http-core foundation and, behind Cargo features, the optional subsystems. Nothing heavy compiles by default — enable only what you use:

FeatureBrings inHeavy deps
(default)DI, routing, RequestContext, auth, resilience, observability, OpenAPI
data / db-*multi-tenant data layer + driverssqlx / sea-orm / diesel
compliancePII masking + field encryptionaes-gcm
realtimeWebSocket gateways + SSE
messagingevent consumer mesh
fulleverything (what docs.rs builds)all

Most applications only need use arcly_http::prelude::*;.

Re-exports§

pub use app::App;
pub use app::LaunchConfig;
pub use futures;
pub use inventory;
pub use schemars;
pub use serde_json;
pub use validator;

Modules§

app
Launch contract.
auth
Identity & Access — JWT, signed cookies, server-side sessions, OAuth2, guards.
cache
Per-route response cache, driven by #[CacheTTL(N)] on the route method.
compliance
Data governance — cross-cutting compliance machinery.
cookie
HTTP cookie signing and extraction via HMAC-SHA256.
core
data
Datasource contracts: tenant-scoped pools + read/write splitting.
docs
Self-documenting API surface: OpenAPI 3 spec assembly + Swagger UI.
event
In-process async event bus — actually lock-free on the emit path.
guards
Request guards — composable preconditions evaluated before a handler runs.
http
Zero-axum public HTTP types.
interceptors
Aspect-oriented interceptors.
messaging
Event consumer mesh — the inbound half of the event architecture.
oauth
OAuth 2.0 provider abstraction.
observability
openapi
OpenAPI 3.0 spec generation + a tiny Swagger UI page.
pipeline
Unified request provenance — one answer to “who is this unit of work, which trace does it continue, which tenant does it belong to?” shared by every transport: HTTP requests, WebSocket handshakes, and consumer-mesh messages.
plugins
Third-party plugin ecosystem.
prelude
use arcly_http::prelude::*; brings in everything a user needs.
realtime
Real-time protocol engine: WebSocket gateways + Server-Sent Events.
resilience
Lock-free circuit breaker + the BreakerOpen sentinel surfaced when the breaker is OPEN.
security
Security headers middleware – a Helmet.js equivalent for arcly-http.
session
Server-side session store abstraction.
testing
First-class testing support for user-land code — the missing half of the NestJS-DX promise (@nestjs/testing equivalent).
transport
Transport-agnostic envelope + error types shared across the request pipeline and the messaging subsystem.
validation
Validated<T> – type-branded, deserialized-and-validated request payload.
web

Structs§

RequestContext
The one and only context passed to every handler.

Enums§

Error