# Bun runtime for Vercel Functions now accepts Bun.serve as an entrypoint

DevFeed: [Bun runtime for Vercel Functions now accepts Bun.serve as an entrypoint](<https://devfeed.tech/articles/bun-runtime-for-vercel-functions-now-accepts-bun-serve-as-an-entrypoint-831.md>)

Original publisher: [Read original article](<https://vercel.com/changelog/bun-serve-entrypoint-for-vercel-functions>)

Author: Florentin Eckl

Published: 2026-08-10T00:00:00Z

Content type: release

Language: en

Sources: [Vercel News](<https://devfeed.tech/sources/vercel-news.md>)

Topics: [Bun](<https://devfeed.tech/topics/bun.md>), [Vercel](<https://devfeed.tech/topics/vercel.md>), [WebSocket](<https://devfeed.tech/topics/websocket.md>), [servers](<https://devfeed.tech/topics/servers.md>)

Tags: [bun](<https://devfeed.tech/tags/bun.md>), [compute](<https://devfeed.tech/tags/compute.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [data](<https://devfeed.tech/tags/data.md>), [external](<https://devfeed.tech/tags/external.md>), [pricing](<https://devfeed.tech/tags/pricing.md>), [server](<https://devfeed.tech/tags/server.md>), [vercel](<https://devfeed.tech/tags/vercel.md>)

## AI overview

Vercel Functions now support Bun.serve() as a Bun runtime entrypoint, including WebSocket handlers. Locally run Bun servers can deploy as-is without being wrapped in a framework, with routes defined in a project-level server.ts file.

## Source excerpt

The Bun runtime for Vercel Functions now supports Bun.serve() as a function entrypoint, including WebSocket handlers. The server you run locally with Bun deploys as-is, without being wrapped in a framework. Enable the runtime by setting "bunVersion": "1.x" in vercel.json. Deploy a routes-based server Create a server with a routes map in server.ts at the project root. Accept WebSocket connections Add a websocket handler and call server.upgrade(request) in fetch to upgrade matching requests. The rest of the server stays the same. WebSocket connections run on Fluid compute with Active CPU pricing, so you pay only for time spent processing messages, not idle connection time. A connection is pinned to one function instance for its lifetime, and a single instance can handle multiple concurrent connections. Use an external data store to coordinate messages across instances. Read the documentation to get started. Read more