vercel_runtime

The official Rust runtime for writing and deploying serverless functions on Vercel.

SDK
Cargo
v2.4.0
16,210stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
95/100Excellent
Development Activity96
Maintenance96
Community88
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
74/100Good
Architecture85
Code Quality72
Innovation80
Learning Curve60

vercel_runtime is the Rust crate that powers Vercel’s serverless and Fluid Compute functions, giving Rust developers a first-class way to handle HTTP requests directly inside Vercel’s build and deployment pipeline. It wraps a hyper-based request/response cycle with optional axum and actix-web adapters, so teams can bring existing web-framework code and run it as a Vercel Function with minimal glue code.

Beyond basic request handling, the crate manages background work via a waitUntil-style awaiter, forwards structured logs and metrics over a Unix-socket IPC channel to Vercel’s runtime host, and exposes typed request/response bodies so Rust’s compile-time guarantees carry through to the edge of the HTTP layer. It is maintained directly inside the vercel/vercel monorepo alongside the Vercel CLI and platform SDKs.

What You Get

  • A run! macro / run entrypoint that wires a Rust async handler into Vercel’s Lambda-style function contract
  • Optional axum feature exposing a VercelLayer tower middleware for dropping an existing Axum app onto Vercel
  • Optional actix feature for running Actix Web applications as Vercel Functions
  • An Awaiter for scheduling background (waitUntil) work that completes after the response is sent
  • Structured logging and metrics forwarded over a Unix-domain-socket IPC channel to the Vercel runtime host
  • Typed Error and ResponseBody types built on serde/serde_json for ergonomic JSON handling

Common Use Cases

  • Deploying a Rust HTTP API as a Vercel serverless function without managing your own container or server
  • Porting an existing Axum or Actix Web application to Vercel with a thin adapter layer instead of a rewrite
  • Building latency-sensitive endpoints (webhooks, edge logic) that benefit from Rust’s performance on Vercel’s Fluid Compute runtime
  • Running background cleanup or logging work after a response has already been returned to the client via waitUntil

Under The Hood

Architecture: The crate centers on a run entrypoint (src/lib.rs) that stands up a hyper http1 connection over a Unix socket, dispatching each request through a tower::Service. A process-global Awaiter (src/awaiter.rs), guarded by lazy_static, collects waitUntil-style background futures so they can be drained once after the response is flushed. On Unix targets, a dedicated IPC module (src/ipc/core.rs, src/ipc/log.rs, src/ipc/metric.rs, src/ipc_utils.rs) opens a UnixStream to send StartMessage/EndMessage/LogMessage frames to the Vercel runtime host, giving the platform visibility into invocation lifecycle, logs, and metrics without the function author writing any of that plumbing. Optional axum and actix submodules (src/axum/mod.rs, src/actix/mod.rs) adapt each framework’s native service traits onto the same hyper-based request pipeline. Tech Stack: Rust 2024 edition; core dependencies are hyper 1.x, hyper-util, tower, tokio (full features), http-body/http-body-util, tokio-stream, serde/serde_json, base64, and lazy_static; libc is pulled in for Unix-only cfg blocks; axum 0.8 + axum-streams and actix-web 4/actix-rt/actix-http are gated behind Cargo features so consumers only compile what they use. Code Quality: The crate has no dedicated unit or integration test suite under crates/vercel_runtime; correctness is instead exercised indirectly through the example apps under examples/axum and examples/actix-web and through Vercel’s own deployment/build pipeline (this is the repo’s monorepo-wide pattern — most testing lives in the TypeScript CLI packages, not the Rust crate). Code is organized into small, single-responsibility modules (types, awaiter, ipc, framework adapters) with #[cfg(unix)] used to cleanly separate platform-specific IPC logic from the cross-platform request path. API Design: The public surface is deliberately small — a run entrypoint, a Request/Response type alias pair, and an Error type — with framework interop handled by opt-in Cargo features (axum, actix) rather than separate crates, so a project pulls in only the adapter code it needs. The axum integration in particular reduces adoption friction to adding a single VercelLayer to an existing Router, and the example projects (examples/axum/src/main.rs) show idiomatic framework code with almost no Vercel-specific boilerplate.

Used by 21 apps in this directory

TypeScript
96%
Other

Cal.diy

Scheduling

48,218

The 100% MIT-licensed, community-driven scheduling platform — self-host your own booking infrastructure with no enterprise strings attached.

View details
95
Repo Health
86
Technical
65
Dependency
Built with
TypeScript96%
Updated yesterday
Rust
53%
Other

Cap

Team Chat · Video Conferencing

21,859

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
64
Dependency
Built with
Rust53%
TypeScript43%
Updated yesterday
Rust
53%
Other

Cap

Team Chat · Video Conferencing

21,859

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
64
Dependency
Built with
Rust53%
TypeScript43%
Updated yesterday
Swift
64%
GPL 3.0

cmux

Developer Tools · AI Development

26,845

A native, Ghostty-based macOS terminal with vertical tabs, agent-aware notifications, and a scriptable browser built for running many parallel AI coding agent sessions instead of juggling tmux panes.

View details
84
Repo Health
81
Technical
72
Dependency
Built with
Swift64%
Rust14%
Updated today
Swift
64%
GPL 3.0

cmux

Developer Tools · AI Development

26,845

A native, Ghostty-based macOS terminal with vertical tabs, agent-aware notifications, and a scriptable browser built for running many parallel AI coding agent sessions instead of juggling tmux panes.

View details
84
Repo Health
81
Technical
72
Dependency
Built with
Swift64%
Rust14%
Updated today
Swift
64%
GPL 3.0

cmux

Developer Tools · AI Development

26,845

A native, Ghostty-based macOS terminal with vertical tabs, agent-aware notifications, and a scriptable browser built for running many parallel AI coding agent sessions instead of juggling tmux panes.

View details
84
Repo Health
81
Technical
72
Dependency
Built with
Swift64%
Rust14%
Updated today
Swift
64%
GPL 3.0

cmux

Developer Tools · AI Development

26,845

A native, Ghostty-based macOS terminal with vertical tabs, agent-aware notifications, and a scriptable browser built for running many parallel AI coding agent sessions instead of juggling tmux panes.

View details
84
Repo Health
81
Technical
72
Dependency
Built with
Swift64%
Rust14%
Updated today
TypeScript
45%
Other

Convex Backend

Developer Tools · Databases

12,494

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript45%
Rust43%
Updated 2 days ago
TypeScript
100%
Other

Dub

Marketing · Analytics

24,676

The open-source link attribution platform for short links, conversion tracking, and affiliate programs — powering 100M+ clicks monthly.

View details
80
Repo Health
78
Technical
62
Dependency
Built with
TypeScript100%
Updated 2 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search