Vercel Functions 的 Bun 运行时现已进入公测阶段

来源: Vercel News

原文

The Bun runtime is now available in Public Beta for Vercel Functions.

You can choose between Node.js and Bun as your project runtime, selecting the best option for your workload.

Benchmarks show Bun reduced average latency by 28% for CPU-bound Next.js rendering compared to Node.js.

To use Bun in Vercel Functions, set the runtime globally in your project's vercel.json:

We currently support the following frameworks, with more on the way:

  • Next.js

  • Hono

  • Express

  • Nitro

Bun supports TypeScript with zero configuration. Here's an example with Hono:

Or get started with one of our starter templates:

Bun deployments automatically integrate with Vercel's existing logging, observability, and monitoring systems.

See benchmarks in our blog post, or read the docs to learn more.

Read more