Edge functions (Prisma ORM v6) (/docs/orm/v6/prisma-client/deployment/edge)
For the complete Prisma documentation index, see llms.txt. A markdown version of any docs page is available by appending
.mdto its URL.
Learn how to deploy your Prisma ORM-backed apps to edge functions like Cloudflare Workers or Vercel Edge Functions
Location: ORM > v6 > Prisma Client > Deployment > Edge functions
If your application is deployed via an "Edge Function" offering or is deployed from a serverless offering and has a non-standard runtime, it is a edge-deployed app. Common examples for such offerings include Cloudflare Workers or Pages, Vercel Edge Functions or Edge Middleware, and Deno Deploy.
[!NOTE] Use Prisma ORM without Rust binaries
If Prisma ORM's Rust engine binaries cause large bundle sizes, slow builds, or deployment issues (for example, in serverless or edge environments), you can use it without them using this configuration of your
generatorblock:prisma generator client { provider = "prisma-client-js" // or "prisma-client" engineType = "client" }Prisma ORM without Rust binaries has been Generally Available since v6.16.0.
Note that you need to use a driver adapter in this case.
When using this architecture:
- No Rust query engine binary is downloaded or shipped.
- The database connection pool is maintained by the native JS database driver you install (e.g.,
@prisma/adapter-pgfor PostgreSQL).This setup can simplify deployments in serverless or edge runtimes. Learn more in the docs here.
To learn why Prisma ORM moved from Rust binary engines to an all-TypeScript approach, and how the two compare in benchmarks, read this blog post.
Getting started
Section titled “Getting started”- Deploy to Cloudflare - Deploy to Cloudflare Workers or Pages
- Deploy to Vercel - Deploy to Vercel Edge Functions
- Deploy to Deno - Deploy to Deno Deploy
Related pages
Section titled “Related pages”Caveats when deploying to AWS platforms: Known caveats when deploying to an AWS platformDeploy migrations from a local environment: Learn how to deploy Node.js and TypeScript applications that are using Prisma Client locally.Deploy Prisma ORM: Learn more about the different deployment paradigms for Node.js applications and how they affect deploying an application using Prisma Client.Deploy to a different OS: Learn how to deploy Node.js and TypeScript applications that are using Prisma Client to a different operating system.Deploying database changes with Prisma Migrate: Learn how to deploy database changes with Prisma Migrate.