Skip to content

Releases: rust-dd/tako

tako v.1.1.0

11 Mar 22:51
0752f44

Choose a tag to compare

Performance-focused release — routing, body handling, middleware, and connection setup all received significant optimizations.

Highlights

  • O(1) method dispatch via MethodMap — fixed-size array replaces HashMap for HTTP method routing
  • Zero-allocation body — new TakoBody enum avoids boxing for Full, Empty, and Incoming variants
  • Lock-free middlewareArcSwap replaces RwLock for route middleware storage
  • TCP_NODELAY on all connections — eliminates Nagle's algorithm latency
  • Custom path params deserializer — zero-copy str::parse() instead of JSON intermediary
  • LTO + codegen-units=1 in release profile for maximum binary optimization
  • 111 tests across 8 test suites · 36 examples

What's New (since v1.0.0)

Performance

Optimization Before After
Method dispatch HashMap<Method, _> lookup MethodMap fixed-size array (O(1) index)
Response body Always-boxed BoxBody TakoBody enum — Full/Empty/Incoming unboxed
Middleware reads RwLock<Vec<BoxMiddleware>> ArcSwap<Vec<BoxMiddleware>> (lock-free)
TCP connections Default (Nagle on) TCP_NODELAY enabled
Path params serde_json round-trip Custom Deserializer with str::parse()
Release binary Default LTO lto = "fat", codegen-units = 1

Routing Rework

  • Complete routing rewrite for performance
  • MethodMap stores handlers in a [Option<RouteEntry>; 9] array indexed by method
  • Dispatch is a direct array index — no hashing, no branching

Auth Handlers

  • Improved BasicAuth, BearerAuth, and JwtAuth handler ergonomics

Middleware & Routing Logic

  • Updated middleware chaining and routing dispatch
  • ArcSwap load guard pattern for zero-contention middleware reads

Examples

  • All 36 examples restructured as standalone crates with their own Cargo.toml
  • Added streams-compio and tls-compio examples
  • Fixed dependency declarations across all example crates

Fixes

  • Fixed vespera_core compatibility (pinned to v0.1.43) for OpenAPI integration
  • Fixed Compio feature dead-code warnings (BodyInner::Incoming, incoming())
  • Fixed missing dependencies in example crates (graphql-generic-ws, openapi, openapi-utoipa, streams)

Breaking Changes

None. All changes are internal optimizations. Existing v1.0.0 code compiles without changes.

Full Changelog: tako-v.1.0.0...tako-v.1.1.0

tako v.1.0.0

02 Mar 13:59
c183533

Choose a tag to compare

The first stable release of Tako — a lightweight, high-performance async web framework for Rust built on Hyper 1.x and Tokio, with optional Compio runtime support.

Highlights

  • Graceful shutdown across all server variants with configurable drain timeout
  • 8 transports — HTTP/1.1, HTTP/2, HTTP/3, WebTransport, Unix sockets, raw TCP/UDP, PROXY protocol
  • HTTP/2 on Compio — full ALPN-based H2 via SendWrapper pattern
  • Background job queue — named queues, retry policies (fixed/exponential), delayed jobs, dead letter queue
  • Route-level SIMD JSON configSimdJsonMode::Always | Never | Threshold(n) per route
  • 10 middleware · 5 plugins · 22+ extractors · 106 tests · 29 examples

What's New (since v0.7.2)

Transports

Transport Tokio Compio Shutdown
HTTP/1.1
HTTP/2 (TLS+ALPN)
HTTP/3 (QUIC)
WebTransport
Unix Domain Socket
Raw TCP
Raw UDP
PROXY protocol v1/v2

Core

  • serve_with_shutdown() — graceful shutdown for all server variants
  • router.error_handler() — global 5xx error hook
  • Per-router and per-route timeouts with custom fallback
  • Config<T> — env-var configuration loader
  • Job queueQueue::builder().workers(4).retry(RetryPolicy::exponential(3, 500ms)).build() with push(), push_delayed(), dead letter queue, graceful shutdown()

New Middleware

SecurityHeaders · RequestId · SessionMiddleware · Csrf · UploadProgress · BodyLimit (stream enforcement) · ApiKeyAuth

New Extractors

Accept · Protobuf<T>

Performance

  • SIMD JSON auto-dispatch with route-level SimdJsonMode config (default threshold: 2 MB)
  • Query/Form single-pass deserialization via serde_urlencoded (eliminated double JSON serialization)

Stability

  • Eliminated all runtime .unwrap() panics (TLS cert loading, compression, config)
  • Fixed Compio + HTTP/3 and Compio + HTTP/2 feature conflicts

Full Inventory

Middleware (10): ApiKeyAuth · BasicAuth · BearerAuth · BodyLimit · Csrf · JwtAuth (14 algorithms) · RequestId · SecurityHeaders · SessionMiddleware · UploadProgress

Plugins (5): CorsPlugin · CompressionPlugin (Gzip/Brotli/DEFLATE/Zstd) · RateLimiterPlugin · MetricsPlugin (Prometheus/OTel) · IdempotencyPlugin

Extractors (22+): Accept · AcceptLanguage · BasicCredentials · BearerToken · Bytes · CookieJar · PrivateCookieJar · SignedCookieJar · Form<T> · HeaderMap · IpAddr · Json<T> · SimdJson<T> · Jwt<C> · Multipart · PathParams · Path<T> · Protobuf<T> · Query<T> · RangeHeader · State<T> · &mut Request

106 tests across 8 test suites · 29 examples including gRPC, WebTransport, job queue, GraphQL, OpenTelemetry

Breaking Changes

None. All new features are additive and feature-gated. Existing v0.7.x code compiles without changes.

Full Changelog: tako-v.0.7.1-2...tako-v.1.0.0

tako v.0.7.1-2

14 Jan 08:51

Choose a tag to compare

tako v.0.7.0

12 Jan 18:41

Choose a tag to compare

What's Changed

Notes

Compio support is experimental. If you want to use WebSocket then pick tokio runtime

Full Changelog: tako-v.0.6.1...tako-v.0.7.0

tako-v.0.6.1

30 Nov 10:43

Choose a tag to compare

What's Changed

  • feat: zero copy extractor by @dancixx in #12
  • feat: Fix build on FreeBSD by updating jwt-simple to use "pure-rust" by @yonas in #13
  • chore: Format fixes via cargo fmt. by @yonas in #15

New Contributors

  • @yonas made their first contribution in #13

Full Changelog: tako-v.0.6.0...tako-v.0.6.1

tako-v.0.6.0

17 Nov 15:03

Choose a tag to compare

tako-v.0.6.0

Features

  • Signals system + examples (#11)
  • Metrics plugin
  • State extractor, protocol version guard
  • Automatic fallback port if requested port is unavailable

Fixes

  • Updated CORS defaults
  • Stable global middleware execution
  • Naming/visibility cleanups
  • Import/module export fixes
  • Misc feature-flag fix

Refactors / Internals

  • Switch to http/http-body
  • Replace Incoming with TakoBody
  • Remove lifetimes from header map / path types
  • Introduce internal RwLock usage
  • Version bumps + doc updates

Migration notes

  • Update body types + imports to http/http-body
  • Replace Incoming with TakoBody
  • Adjust code using header/path lifetimes
  • Revisit CORS + middleware behavior if relying on old defaults

Full Changelog: tako-v.0.5.0...tako-v.0.6.0

tako-v.0.5.0

11 Nov 23:15

Choose a tag to compare

Release notes

  • Built in GraphQL support using async-graphql
  • Add more examples
  • Some performance updates

Full Changelog: tako-v.0.4.1...tako-v.0.5.0

tako-v.0.4.1

09 Nov 10:47

Choose a tag to compare

tako v.0.4.0

07 Nov 00:36

Choose a tag to compare

Tako v0.4.0

Tako v0.4.0 focuses on more ergonomic handler definitions and some quality-of-life improvements around plugins and responders

Added

  • Extractor-based handlers – Handlers can now take extractors directly in their parameter list (Axum-style), instead of manually calling extractors on a mutable Request.

  • anyhow::Result<T> as a Responder – You can now return anyhow::Result<T> from handlers where T: Responder; errors are converted into 500 responses.

  • Route-level plugins – Plugins (e.g. rate limiting, middleware-like logic) can be attached per-route.

  • Re-exportshyper::header (and related types) are re-exported for easier use from Tako.

  • Internal refactors and logging improvements around the rate limiter and plugins.

Breaking change: handler signatures

Previously, handlers typically looked like this:

// Tako 0.3.x
use tako::{Request, Responder};

pub async fn create_user(mut req: Request) -> impl Responder {
    // manually run extractors on &mut req
    // e.g. Json::extract(&mut req).await, etc.
}

In 0.4.0, handlers are expected to use extractors directly in the function parameters, instead of working off a mut Request:

// Tako 0.4.0
use tako::{extractors::Json, Responder};

pub async fn create_user(
    Json(payload): Json<CreateUser>,
) -> impl Responder {
    // `payload` is already extracted here
}

You can mix and match any supported extractors in the signature (e.g. Json<T>, path/query extractors, etc.), and still return any type that implements Responder. If you really need the raw request, you can add a corresponding extractor for it as one of the parameters, but the recommended style is to keep handler signatures extractor-based and avoid pub async fn handler(mut req: Request) going forward.

Full Changelog: tako-v.0.3.2...tako-v.0.4.0

tako v.0.3.2

15 Aug 07:12

Choose a tag to compare