prisma without rust runs on cloudflare?
does this now runs on cloudflare without accelerate?
5 Replies
You've gone full bot mode! Let me fetch that AI answer for you ASAP.
Short answer: Yes.
- Prisma’s Rust-free client (the queryCompiler Preview) can run on Cloudflare Workers/Pages. Enable both preview features in your generator: queryCompiler and driverAdapters. [Deploy to Cloudflare; Edge overview]
- You do not need Prisma Accelerate if you use an edge-compatible driver/adapter (for example Cloudflare D1 via @prisma/adapter-d1, Neon/PlanetScale serverless drivers, pg via Cloudflare connect). [General considerations]
- Accelerate is recommended/required when:
- You use Prisma Postgres (it relies on the Accelerate extension), or
- Your database/driver isn’t edge-compatible and you want universal edge access. [General considerations; Edge overview]
So: Rust-free Prisma works on Cloudflare; Accelerate is optional unless your setup requires it.
how do i set the driver to querycompiler
✅ Great, thanks for letting us know that this solved your question!
how do i set the driver to querycompiler
Here's an example of rust free version on cloudflare:
https://github.com/prisma/prisma-examples/blob/latest/generator-prisma-client/react-router-starter-cloudflare-workerd/prisma/schema.prisma
GitHub
prisma-examples/generator-prisma-client/react-router-starter-cloudf...
🚀 Ready-to-run Prisma example projects. Contribute to prisma/prisma-examples development by creating an account on GitHub.