vercel_runtime

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

SDK
Cargo
v2.4.1
16,431 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
96 /100 Excellent
Development Activity 100
Maintenance 96
Community 88
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
74 /100 Good
Architecture 85
Code Quality 72
Innovation 80
Learning Curve 60

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 23 apps in this directory

TypeScript
94%
Apache 2.0

flue

AI Agents · Developer Tools

8,521

Build autonomous AI agents and powerful workflows with a programmable TypeScript harness that gives any model sessions, tools, sandboxes, and durable execution.

View details
81
Repo Health
82
Technical
69
Dependency
Built with
TypeScript 94%
Updated 1 weeks ago
TypeScript
71%
Other

highlight.io

Analytics · Developer Tools · Monitoring

9,384

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
76
Repo Health
78
Technical
65
Dependency
Built with
TypeScript 71%
Go 16%
Updated 6 days ago
TypeScript
98%
Other

LobeHub

AI Assistants · Automation · Productivity

83,455

Your Chief Agent Operator — build, schedule, and collaborate with an entire AI team in one self-hostable workspace.

View details
92
Repo Health
81
Technical
65
Dependency
Built with
TypeScript 98%
Updated 5 days ago
TypeScript
99%
MIT

open-agents

AI Agents · Developer Tools

5,861

Open-source reference app for building and running background AI coding agents on Vercel — from chat prompt to committed code changes without keeping your laptop involved.

View details
41
Repo Health
78
Technical
73
Dependency
Built with
TypeScript 99%
Updated 2 months ago
TypeScript
90%
MIT

OpenClaw

AI Agents · AI Assistants

392,894

An open-source AI assistant that runs on your own hardware and meets you in Discord, Slack, WhatsApp, iMessage, Telegram, and 20+ other channels, with native apps for every major platform.

View details
88
Repo Health
88
Technical
66
Dependency
Built with
TypeScript 90%
Updated 5 days ago
TypeScript
99%
Other

Papermark

Digital Signiture · File Storage

9,263

Open-source DocSend alternative with page-by-page analytics, secure data rooms, and custom domains for document sharing.

View details
78
Repo Health
63
Technical
66
Dependency
Built with
TypeScript 99%
Updated 2 months ago
TypeScript
96%
Apache 2.0

rakazo

AI Agents · AI Assistants

5,488

An open-source platform for persistent AI teammates that own their own conversations, memory, routines, and computers — self-hosted, model-agnostic, and available on web, desktop, and mobile.

View details
82
Repo Health
91
Technical
70
Dependency
Built with
TypeScript 96%
Updated 6 days ago
TypeScript
95%
AGPL 3.0

Rallly

Scheduling

5,318

Self-hostable group scheduling polls that eliminate back-and-forth emails and find the best meeting time for everyone.

View details
91
Repo Health
75
Technical
66
Dependency
Built with
TypeScript 95%
Updated 6 days ago
TypeScript
99%
MIT

Sanity

CMS

6,370

Open-source headless CMS with a fully customizable React Studio, real-time collaborative editing, structured content modeling, and GROQ query language

View details
92
Repo Health
90
Technical
66
Dependency
Built with
TypeScript 99%
Updated 5 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