Skip to content
프로젝트

소개

Multi-transport Rust web framework: HTTP/1.1, HTTP/2, HTTP/3, WebSocket, SSE, gRPC, TCP/UDP and Unix sockets behind one router, on Tokio or Compio.

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
-1
in 15 days
+2
in 1 month
+8

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Build Workflow Crates.io License

🐙 Tako — Multi-Transport Rust Framework for Modern Network Services

Tako ("octopus" in Japanese) is a pragmatic, ergonomic and extensible Rust framework for services that go beyond plain HTTP. Build one cohesive application across HTTP/1.1, HTTP/2, HTTP/3, WebSocket, SSE, gRPC, TCP, UDP, Unix sockets, and WebTransport with a single routing, middleware, and observability model.

📖 Full documentation → tako.rust-dd.com  ·  API docs (docs.rs)  ·  Release notes  ·  llms.txt for AI assistants

Why Tako

  • Typed handlers — ordinary async functions, typed request extractors, and flexible response types.
  • Beyond HTTP — add WebSockets, event streams, gRPC, or raw socket services as your application grows.
  • Your choice of runtime — Tokio or Compio; every transport runs on both.
  • Room to tune — opt into SIMD JSON, zero-copy extractors, compression, or jemalloc when your workload calls for them.

Quick start

Requires Rust 1.95+. Tako uses edition 2024.

Add these dependencies to your Cargo.toml:

[dependencies]
tako-rs = "2.7"
tokio = { version = "1", features = ["macros", "net", "rt-multi-thread"] }

Then create src/main.rs. The package is tako-rs; the Rust import is tako.

use tako::{router::Router, types::BoxError, Server};
use tokio::net::TcpListener;

#[tokio::main]
async fn main() -> Result<(), BoxError> {
    let mut router = Router::new();
    router.get("/", || async { "Hello, Tako!" });

    let listener = TcpListener::bind("127.0.0.1:8080").await?;
    Server::builder()
        .build()
        .try_spawn_http(listener, router)?
        .result()
        .await?;

    Ok(())
}

Start it with cargo run, then visit http://127.0.0.1:8080 or run:

curl http://127.0.0.1:8080/

Continue with the Quickstart guide or explore the runnable examples. Coming from Axum? The Axum guide maps each building block, and the comparison covers when to pick Tako, Axum, or Actix Web.

At a glance

Area Capabilities
Transports HTTP/1.1, HTTP/2, HTTP/3, WebSocket, WebTransport, SSE, TCP, UDP, Unix sockets, PROXY protocol
Extractors JSON, form, query, path, headers, cookies, JWT claims, API keys, multipart, protobuf
Middleware Authentication, CSRF, sessions, security headers, request IDs, body limits, rate limiting, CORS, idempotency, compression
Integrations GraphQL, gRPC (unary and streaming), OpenAPI, Prometheus, OpenTelemetry, queues, signals

The default setup uses Tokio and includes HTTP/1.1. Enable additional protocols and integrations through Cargo features. See the runtime compatibility guide for transport support on Tokio and Compio.

For HTTP/3 and WebTransport diagnostics, enable http3-qlog and configure .h3_qlog_dir(...) on either server builder. See the qlog guide for per-connection trace files and output limits.

Upgrading? 2.6 changes session stores, idempotency identity, request body limits, and queue lifecycle behavior. Follow the 2.6 migration guide. The 2.5 migration guide covers the WebSocket API, removed deprecated APIs, and raw multipart changes. The 2.4 migration guide covers core pinning, the header deadline, and extractor entries. The 2.3 migration guide covers the removed HTTP client, WebTransport, and gRPC changes, the 2.2 migration guide the per-thread changes, and the 2.1 migration guide the API changes and opt-in transport features from 2.0.

Benchmarks

Hello-world requests per second under loopback, server-bound, and pipelined load for Tako per-thread with and without core pinning, Actix Web, ntex, Tako, Tako with jemalloc, and Axum
Framework Loopback · 1,000 conns Server-bound · 256 conns Pipelined ×16 · 256 conns
Tako per-thread 1,842,063 612,091 15,033,668
Tako per-thread, pinned 1,780,810 611,956 15,716,822
Actix Web 1,786,640 570,865 12,806,477
ntex 1,740,750 543,076 8,749,294
Tako 1,401,625 483,526 11,512,467
Tako + jemalloc 1,386,954 469,807 10,853,271
Axum 1,132,259 389,844 —

Requests per second for GET / → Hello, World!. The thread-per-core per-thread server serves 3% more requests than Actix Web on loopback, where kernel time dominates, 7% more when the server is the bottleneck, and 17% more when wrk pipelines 16 requests at a time. The pinned row turns on pin_to_core, which is off by default. Tako's default server serves about 24% more than Axum on the same Tokio runtime, at 1,000 connections and server-bound alike. Axum has no pipelined number because axum::serve leaves TCP_NODELAY off.

Each number is the median of five 15-second wrk runs in a 24 vCPU Linux container (AMD EPYC 9655P), measured with tako-rs 2.4.0 in October 2026. Results move with hardware and configuration, so read the methodology and reproduction steps before drawing conclusions.

License

MIT — see LICENSE.

Made with ❤️ & 🦀 by the Tako contributors.

관련 프로젝트 살펴보기

불러오는 중…