Dart Edge

Dart Edge is a project aimed at running Dart code on Edge functions, including support for platforms such as Cloudflare Workers, Vercel Edge Functions & Supabase Edge Functions (more to come).

Dart Edge is an experimental project - it's probably not ready for production usage unless you're okay with living on the 'edge'.

How it works#

Dart Edge provides a runtime package which enables Dart to communicate with APIs found on Edge runtime environments. Your Dart code is compiled to JavaScript (and soon WASM), and deployed to a runtime environment, or platform such as Cloudflare Workers or Vercel Edge Functions.

The package also provides additional platform specific bindings where possible, such as Durable Objects. Not everything is supported yet, we'll get there eventually.

Getting started#

For local development and using the platform CLIs, you'll need to ensure NodeJS (18.14.0+) is installed on your machine.

The easiest way to get started is to install the edge CLI:

dart pub global activate edge

Next create a new project for your specific provider:

What next?#

Each platform is slightly different, so visit the platform specific documentation on how to work with platform specific APIs, handle local development and deployment.

Some other useful resources: