Skip to content
← Back to Blog

Tuesday, June 21st 2022

Engineering

Tuesday, June 21st 2022

Introducing the Edge Runtime

Posted by

Avatar for leerob

Lee Robinson

@leeerob

Vercel’s mission is to enable developers to build dynamic, global applications.

To enable every framework to build for the edge, we’re releasing edge-runtime: a toolkit for developing, testing, and defining the runtime web APIs for edge infrastructure.

What is the Edge Runtime?

The Edge Runtime is a new library designed to help framework authors adopt edge computing and provide open-source tooling built on web standards. It’s designed to be integrated into frameworks (like Next.js) and not for usage in application code. This runtime is purposefully minimal and designed for security and speed.

The latency between your customers and most server infrastructure, often located in US East, makes it difficult to create a consistently fast web experience around the world without additional infrastructure or DevOps burden. To democratize web performance, frameworks must shift to enable running code at the edge. These Edge Networks enable you to run code close to your visitors, making a fast web accessible for everyone, regardless of their location.

When your framework is built on the edge-runtime, it runs everywhere Node.js does. When deployed to infrastructure like Vercel, frameworks like Next.js can automatically provision the optimal infrastructure for you: either at the edge or at origin.

Developers can opt into using Edge Functions to run code closer to their customers. When developing locally, the edge-runtime will polyfill web APIs and ensure compatibility with the Node.js layer, so your development workflow remains frictionless.

Edge, for all frameworks

We believe the Web is an open platform for everyone, including the next generation of frameworks. Every framework on Vercel should have the ability to use edge infrastructure primitives.

Build at the edge with your favorite frameworks like React, Next.js, Svelte, Vue, Gatsby, Angular, and Nuxt
Build at the edge with your favorite frameworks like React, Next.js, Svelte, Vue, Gatsby, Angular, and Nuxt
Build at the edge with your favorite frameworks like React, Next.js, Svelte, Vue, Gatsby, Angular, and Nuxt
Build at the edge with your favorite frameworks like React, Next.js, Svelte, Vue, Gatsby, Angular, and Nuxt
Build at the edge with your favorite frameworks like React, Next.js, Svelte, Vue, Gatsby, Angular, and Nuxt
Build at the edge with your favorite frameworks like React, Next.js, Svelte, Vue, Gatsby, Angular, and Nuxt
Build at the edge with your favorite frameworks like React, Next.js, Svelte, Vue, Gatsby, Angular, and Nuxt
Build at the edge with your favorite frameworks like React, Next.js, Svelte, Vue, Gatsby, Angular, and Nuxt

The edge-runtime includes tools for framework authors to test code in edge environments. Previously these developers would need to stitch together multiple tools and packages to correctly target the correct set of web APIs defined in certain edge environments.

The edge-runtime enables any framework author to support the edge with the web APIs and standards defined by the working group. This is a critical step toward better interoperability between server-side frameworks and building a better, more accessible Web.

Building on open standards with WinterCG

We’re working closely with partners like Cloudflare, Shopify, and the Node.js and Deno teams to provide interoperability of web platform APIs across runtimes. Last month, Vercel joined WinterCG to advance the Web towards an edge-first future.

Vercel supports API interoperability along with Shopify, Cloudflare, Deno, and more
Vercel supports API interoperability along with Shopify, Cloudflare, Deno, and more
Vercel supports API interoperability along with Shopify, Cloudflare, Deno, and more
Vercel supports API interoperability along with Shopify, Cloudflare, Deno, and more
Vercel supports API interoperability along with Shopify, Cloudflare, Deno, and more
Vercel supports API interoperability along with Shopify, Cloudflare, Deno, and more
Vercel supports API interoperability along with Shopify, Cloudflare, Deno, and more
Vercel supports API interoperability along with Shopify, Cloudflare, Deno, and more

Today, the release of the edge-runtime is the first artifact of that vision. While Next.js and Vercel are the first frameworks utilizing the edge-runtime, this toolkit now enables any framework to support the edge and the standards defined by WinterCG.

Further, the edge-runtime is designed to be lean and efficient. Our goal is to focus on open standards, not introduce new APIs. Platforms can provide additional functionality on top of the standards-based runtime.

The future is at the edge

When you develop, preview, and ship new Next.js and Vercel applications, you’re already using the edge-runtime through features like Edge Functions and Edge Middleware.

Framework authors can read the documentation to learn how to integrate the toolkit into their framework. To learn more about the Build Output API, see how you can add support for every infrastructure primitive on the Vercel platform.

We want to enable any developer to build the future of the Web. And we believe that future is an open, interoperable, edge-first Web.

Tweet

Develop.
Preview.
Ship.

The development platform for the best frontend teams.