All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- One-call production baseline:
.production_defaults("service-name")enablesRequestIdLayer,TracingLayer, and built-in health probes in a single builder call. ProductionDefaultsConfigfor granular control:.version(),.tracing_level(),.request_id(),.tracing(),.health_endpoints()..production_defaults_with_config(config)for full customization.
- Built-in
/health,/ready,/liveendpoints — Kubernetes-compatible probes out of the box. HealthCheckBuilderwith.add_check(name, async_fn)for custom dependency checks.HealthStatusenum:Healthy,Unhealthy { reason },Degraded { reason }.HealthCheckResultresponse with per-component status, version, and ISO 8601 timestamp.HealthEndpointConfigfor custom endpoint paths./healthreturns aggregated status (200/503),/readychecks dependencies,/liveis a lightweight process probe..health_endpoints(),.health_endpoints_with_config(),.with_health_check()onRustApibuilder.- All types re-exported in
rustapi-rsprelude.
- Cookie-backed session middleware with
SessionLayerandSessionextractor. SessionConfigwith.cookie_name(),.cookie_path(),.cookie_domain(),.secure(),.http_only(),.same_site(),.ttl(),.rolling().MemorySessionStore— in-memory store with.len()and.is_empty().SessionStoretrait for custom backends (load,save,delete).Sessionextractor methods:.get(),.insert(),.contains(),.destroy(),.cycle_id(),.id().SessionRecordwith expiration tracking (.is_expired(),.ttl_seconds()).- Secure defaults:
HttpOnly,Secure,SameSite=Lax, 24h TTL, rolling refresh. - Re-exported under
rustapi_rs::extras::session.
- Three strategies via
RateLimitStrategy:FixedWindow,SlidingWindow,TokenBucket. - Per-IP tracking with
DashMap. - Response headers:
X-RateLimit-Remaining,Retry-After. - Returns 429 Too Many Requests on limit exceeded.
- Re-exported under
rustapi_rs::extras::rate_limit.
cargo rustapi bench— run benchmark workflow with--warmupand--iterationsoptions.cargo rustapi observability— surface observability assets and check production readiness (--checkfor strict mode).cargo rustapi doctor— expanded environment health checks with--strictmode.
StreamingMultipartField:.bytes_read()progress tracking,.save_to(),.save_as(),.into_uploaded_file().StreamingMultipart/Multipart:.field_count()method.
auth_api.rs— session-based authentication (login/logout/refresh/me).full_crud_api.rs— complete CRUD API with statefulArc<RwLock<HashMap>>.jobs_api.rs— background job queue withInMemoryBackend.streaming_api.rs— server-sent events (SSE) streaming.
crates/rustapi-core/examples/perf_snapshot.rs— synthetic in-process benchmark measuring ultra fast, fast, and full execution paths.
scripts/bench.ps1updated to run bothcargo bench --workspaceand the perf snapshot example.- Facade (
rustapi-rs) now re-exportsProductionDefaultsConfig, health types, session module, and rate limit module.
- 10+ new cookbook recipes: session auth, observability, error handling, custom extractors, middleware debugging, Axum migration, Actix migration, OIDC/OAuth2 production, macro attributes reference, deployment expansion.
docs/PERFORMANCE_BENCHMARKS.mdexpanded with perf snapshot methodology.docs/GETTING_STARTED.mdupdated.crates/rustapi-rs/examples/README.md— example catalog and descriptions.
0.1.397 - 2026-02-26
- Body-consuming extractor ordering enforced at compile time:
Json<T>,Body,ValidatedJson<T>must now be the last handler parameter — otherwise you get a clear compiler error instead of a silent runtime failure. - Descriptive error messages:
"Body-consuming extractors must be the last parameter". - Detects multiple body-consuming extractors in the same handler.
- New
#[errors(404 = "Not found", 403 = "Forbidden")]attribute macro for route handlers. - Error types are automatically reflected in the OpenAPI spec with
ErrorSchemareferences. Route::error_response()builder method for programmatic error response registration.- Swagger UI now displays all possible error responses per endpoint.
Paginateextractor:?page=2&per_page=20with sensible defaults (page=1, per_page=20, max=100).Paginated<T>response wrapper: JSON body withitems/meta/_links, RFC 8288Linkheader,X-Total-Count&X-Total-Pagesheaders.CursorPaginateextractor:?cursor=abc&limit=20for cursor-based pagination.CursorPaginated<T>response wrapper:items+next_cursor+has_more.- Helper methods:
offset(),limit(),paginate(),after(),is_first_page(). - All types re-exported in the
rustapi-rsprelude.
- Full rewrite of the caching system with production-grade features:
- In-memory response cache with LRU eviction and configurable
max_entries(default: 10,000). - ETag generation via FNV-1a hash + automatic
If-None-Match→ 304 Not Modified. Cache-Controlheader awareness (no-cache,no-store).Vary-by-header cache key strategy.CacheHandlefor programmatic invalidation (by path prefix, exact key, or clear all).CacheBuilderfor ergonomic middleware configuration.
- In-memory response cache with LRU eviction and configurable
EventBus: In-process pub/sub with sync and async handlers.on()for sync handlers,on_async()for async handlers.emit()(fire-and-forget) andemit_await()(wait for all handlers).handler_count()andtopics()introspection.
- Lifecycle hooks on
RustApibuilder:.on_start(async { ... })— runs before the server starts accepting connections..on_shutdown(async { ... })— runs on graceful shutdown.- Integrated into both
run()andrun_with_shutdown().
EventBusre-exported in therustapi-rsprelude.
- Complete rewrite of
cargo rustapi watchusingnotify+notify-debouncer-mini— no morecargo-watchdependency.- 300ms debounce, configurable extension filter, smart ignore paths.
- Build-before-restart: only restarts the server if
cargo buildsucceeds. - Graceful process shutdown (kill + 5s timeout), crash detection with "watching for changes" recovery.
.hot_reload(true)builder API onRustApi— prints a dev-mode banner with watcher hints.cargo rustapi run --watch/--reload/--hotdelegates to the native watcher.
- First crates.io release of
rustapi-grpc v0.1.397. run_rustapi_and_grpc()for dual HTTP + gRPC server execution.- Re-exports
tonicandprostfor ergonomic proto service integration. protocol-grpcfeature flag inrustapi-rs.
- Facade-first CORE stabilization:
rustapi-rspublic surface is now explicitly curated (core,protocol,extras,prelude).- Internal wiring moved behind
rustapi_rs::__privatefor macro/runtime integration. rustapi-coreinternal modules tightened (pub(crate)/private where applicable).Handlertrait sealed to prevent external implementation leakage.
- Feature taxonomy refresh:
- Canonical naming is now
core-*,protocol-*,extras-*. - Meta features standardized:
core,protocol-all,extras-all,full. - Legacy feature names remain as compatibility aliases and are deprecated.
- Canonical naming is now
- Publish pipeline:
rustapi-grpcadded tosmart_publish.ps1andpublish.ps1in correct dependency order.
- Clippy lint:
.map_or(false, ...)→.is_some_and(...)in cache middleware. - Clippy lint: Nested
format!macros replaced with singleformat!in ETag generation.
- Expanded cookbook: gRPC, SSR, and AI skill recipes.
- Learning path improvements across multiple maintenance runs.
- Fixed SSR recipe and updated recipes index.
- Public API governance:
- Snapshot files under
api/public/forrustapi-rs(default + all-features). - CI workflow for snapshot drift check and PR label gate.
- Snapshot files under
- Compatibility contract: New
CONTRACT.mddefining SemVer, MSRV (1.78), deprecation and feature policies.
- Legacy facade paths and feature aliases are soft-deprecated and scheduled for removal no earlier than two minor releases after announcement.
0.1.335 - 2026-02-13
- Pagination cookbook recipe and synced docs to v0.1.335.
- HATEOAS test schemas with manual
RustApiSchemaimplementations. - RELEASES.md for release tracking.
- Lint formatting in
custom_messages.rs. - Pagination size validation (PR review feedback).
- Cumulative CI failure fixes.
0.1.300 - 2026-02-06
- Replay (Time-Travel Debugging): Complete time-travel debugging system for recording and replaying HTTP requests
- rustapi-core: Pure types and traits (ReplayConfig, compute_diff, ReplayEntry, ReplayMeta, redaction, ReplayStore trait, truncation)
- rustapi-extras: Production-ready implementation
ReplayLayermiddleware for automatic request/response recordingInMemoryReplayStoreandFileSystemReplayStoreimplementations- Admin HTTP routes for listing, replaying, and diffing entries
ReplayClientfor programmatic replay testing- Authentication with bearer token
RetentionJobfor automatic cleanup of expired entries
- cargo-rustapi: CLI commands for replay management (requires
replayfeature)- Install with:
cargo install cargo-rustapi --features replay cargo rustapi replay list- List recorded entriescargo rustapi replay show <id>- Show entry detailscargo rustapi replay run <id> --target <url>- Replay requestcargo rustapi replay diff <id> --target <url>- Compare responsescargo rustapi replay delete <id>- Delete entry
- Install with:
- Security features: disabled by default, admin token required, sensitive header/body redaction, configurable TTL
- Cookbook recipe with comprehensive examples and security guidelines
- Fixed broken intra-doc link to
ReplayLayerin rustapi-core replay module documentation
- Removed unused
check_diff.pyscript from repository root
0.1.202 - 2026-01-26
This release delivers a 12x performance improvement, bringing RustAPI from ~8K req/s to ~92K req/s.
Note: the numbers below are preserved as a historical release snapshot. Current benchmark methodology and canonical public performance claims are maintained in
docs/PERFORMANCE_BENCHMARKS.md.
| Framework | Requests/sec | Latency (avg) |
|---|---|---|
| RustAPI | ~92,000 | ~1.1ms |
| Actix-web 4 | ~105,000 | ~0.95ms |
| Axum | ~100,000 | ~1.0ms |
Tested with hey -n 100000 -c 100 on Windows 11, Ryzen 9 5900X
- Ultra-Fast Path: New routing path that bypasses both middleware AND interceptors for maximum performance
- simd-json Serialization: Extended simd-json support from parsing-only to full serialization with
to_vecandto_vec_with_capacity
- TCP_NODELAY: Disabled Nagle's algorithm for lower latency
- Pipeline Flush: Enabled HTTP/1.1 pipeline flushing for better throughput
- ConnectionService: Reduced Arc cloning overhead per connection
- HandleRequestFuture: Custom future implementation for request handling
- Removed unused static variables from bench_server
- Updated README.md with accurate benchmark numbers
- Removed inflated performance claims
- Added TechEmpower-based comparison data
- Created BEAT_ACTIX_ROADMAP.md for future optimizations
0.1.15 - 2026-01-23
- Deployment Tooling (cargo-rustapi): Added
deploycommand supporting Docker, Fly.io, Railway, and Shuttle.rs with config generation. Added OpenAPI client generation for Rust, TypeScript, and Python. Updated dependencies for YAML support and remote specs. - HTTP/3 (QUIC) Support (rustapi-core): Added HTTP/3 infrastructure using Quinn + h3 stack. Supports self-signed certs (dev) and dual-stack execution. Added
http3andhttp3-devfeatures. - HATEOAS & ReDoc Improvements: Added HATEOAS module to
rustapi-core(HAL-style links, resource wrappers, pagination). Refactored ReDoc HTML generation inrustapi-openapiwith exposed configuration. - Validation i18n & New Capabilities: Added i18n support (rust-i18n) with EN/TR locales in
rustapi-validate. Refactored rule messages to use message keys. Added custom async validation support (parsing, macros, tests). Removedvalidatorcrate dependency.
- Unified Response Body: Refactored
rustapi-coreto use a unifiedBody/ResponseBodyabstraction for full and streaming responses. Standardized middleware and cache layers. - Streaming Behavior: Clarified flow behavior for streaming responses (e.g., explicit
Transfer-Encoding: chunked). - Server Lifecycle: Added graceful shutdown signal method for better lifecycle control.
- OpenAPI Path Params: Added support for custom schema type overrides for path parameters via
#[rustapi_rs::param]and.param().
- Validation Groups: Fixed logic for default group application and context boundaries.
- Circuit Breaker: Fixed syntax error in
circuit_breaker.rs. - OpenAPI: Improved param schema/type handling; fixed UUID path param integer display bug (#55).
- Traits: Reorganized trait documentation examples.
- Cookbook: Added deployment and HTTP/3 documents.
- General: Updated crate pages and README contact info.
- Coverage: Added GitHub Actions job for coverage generation with
cargo-tarpaulin.
- Refactoring: Moved modules in
rustapi-extrasto subdirectories. Cleaned up unused imports and small refactors across the workspace. - Versioning: Bumped workspace versions to 0.1.15.
0.1.11 - 2026-01-14
- WebSocket: Fixed
ManualUpgradeerror by properly draining request body before upgrade inrustapi-ws. - WebSocket: Enabled
http1::Builder::with_upgrades()inrustapi-coreserver for Hyper 1.0 compatibility. - Examples: Fixed compilation issues in
phase11-demoandgraphql-api. - Examples: Updated
websocketexample with better debug logging.
0.1.10 - 2026-01-14
- Updated READMEs for all crates with comprehensive examples and better structure.
- Improved
Cargo.tomldescriptions and documentation links.
0.1.9 - 2026-01-14
simd-jsonfeature: 2-4x faster JSON parsing when enabled- Stack-optimized
PathParams: UsingSmallVec<[_; 4]>for fewer allocations - Conditional tracing: Logging gated behind
tracingfeature for 10-20% less overhead - Streaming request body: Support for large/unbuffered bodies without full memory buffering
rustapi-jobs: Background job processing- In-memory, Redis, and Postgres backends
- Job queue with retry logic and exponential backoff
- Dead letter queue for failed jobs
- Scheduled and delayed execution
rustapi-testing: Test utilitiesTestServerfor spawning test instancesMatcherfor response body/header matchingExpectationbuilder for fluent assertions
- Audit Logging System in
rustapi-extras- GDPR and SOC2 compliance support
- In-memory and file-based audit stores
- Event/query types with store trait
cargo rustapi watch— Auto-reload on file changescargo rustapi add— Add dependencies or featurescargo rustapi doctor— Check environment health
- Property-based tests with
proptest:- Streaming memory bounds validation
- Audit event completeness
- CSRF token lifecycle
- OAuth2 token exchange round-trips
- OpenTelemetry trace context propagation
- Structured logging format compliance
event-sourcing— CQRS/Event Sourcing demomicroservices-advanced— Multi-binary with Docker + service discoveryserverless-lambda— AWS Lambda integration
- Fixed async handling and error mapping in file writes
- Fixed Redis
zaddcall in job backend - Enabled
r2d2feature for diesel, clarified error types - Removed unused imports across crates
0.1.8 - 2026-01-10
- CORS middleware:
CorsLayerwith fullMiddlewareLayertrait implementation- Support for
CorsLayer::permissive()and custom configuration - Proper preflight request handling
- Origin validation and credential support
- Support for
- Fixed missing
MiddlewareLayerimplementation forCorsLayer - Fixed CI build issues with GitHub Actions runner disk space
0.1.4 - 2026-01-03
#[rustapi_rs::schema]attribute macro for opt-in OpenAPI schema auto-registration
- Internal workspace dependency pins aligned to the workspace version for consistent publishing
- Proof-of-concept example includes a minimal
GET /landing page
0.1.3 - 2026-01-01
- New
rustapi-tooncrate: TOON (Token-Oriented Object Notation) format support- LLM-optimized data serialization format
- Content negotiation via
Acceptheader (application/toon,application/json) Toon<T>extractor and responderToonNegotiate<T>for automatic format selectionLlmResponse<T>for AI-friendly structured responses- OpenAPI integration with TOON schema support
toonfeature flag inrustapi-rsfor opt-in TOON supporttoon-apiexample demonstrating TOON format usage- Improved cookie extraction test for duplicate cookie names
- Updated
rustapi-rsto re-export toon module when feature enabled
0.1.2 - 2024-12-31
skip_pathsmethod for JwtLayer to exclude paths from JWT validationdocs_with_authmethod for Basic Auth protected Swagger UIdocs_with_auth_and_infomethod for customized protected docs
- auth-api example now demonstrates protected docs with Basic Auth
- JWT middleware can now skip validation for public endpoints
0.1.1 - 2024-12-31
- Body size limit middleware with configurable limits
.body_limit(size)builder method on RustApi (default: 1MB)- 413 Payload Too Large response for oversized requests
- Production error masking (
RUSTAPI_ENV=production) - Development error details (
RUSTAPI_ENV=development) - Unique error IDs (
err_{uuid}) for log correlation - Enhanced tracing layer with request_id, status, and duration
- Custom span field support via
.with_field(key, value) - Prometheus metrics middleware (feature-gated)
http_requests_totalcounter with method, path, status labelshttp_request_duration_secondshistogramrustapi_infogauge with version information/metricsendpoint handler- TestClient for integration testing without network binding
- TestRequest builder with method, header, and body support
- TestResponse with assertion helpers
RUSTAPI_DEBUG=1macro expansion output support- Improved route path validation at compile time
- Enhanced route conflict detection messages
- Error responses now include
error_idfield - TracingLayer enhanced with additional span fields
0.1.0 - 2024-12-01
- Core HTTP server built on tokio and hyper 1.0
- Radix-tree based routing with matchit
- Request extractors:
Json<T>,Query<T>,Path<T> - Response types with automatic serialization
- Async handler support
- Basic error handling with
ApiError #[rustapi_rs::get],#[rustapi_rs::post]route macros#[rustapi_rs::main]async main macro
- Automatic OpenAPI spec generation
- Swagger UI at
/docsendpoint - Request validation with validator crate
#[validate]attribute support- 422 Unprocessable Entity for validation errors
#[rustapi_rs::tag]and#[rustapi_rs::summary]macros- Schema derivation for request/response types
- JWT authentication middleware (
jwtfeature) AuthUser<T>extractor for authenticated routes- CORS middleware with builder pattern (
corsfeature) - IP-based rate limiting (
rate-limitfeature) - Configuration management with
.envsupport (configfeature) - Cookie parsing extractor (
cookiesfeature) - SQLx error conversion (
sqlxfeature) - Request ID middleware
- Middleware layer trait for custom middleware
extrasmeta-feature for common optional featuresfullfeature for all optional features