Troubleshooting binary size and deployment issues
If you encounter large bundle sizes, slow builds, or deployment errors related to Prisma’s Rust engine binaries, for example, in serverless or edge environments, the issue may be caused by the default native Rust query engine that ships with Prisma Client.
As of v6.7.0, you can resolve these issues by enabling the queryCompiler
Preview feature.
When enabled, Prisma Client is generated without a Rust-based query engine binary, reducing build artifacts and removing native binary dependencies.
generator client {
provider = "prisma-client-js"
previewFeatures = ["queryCompiler", "driverAdapters"]
}
The driverAdapters
Preview feature is required alongside queryCompiler
.
With this architecture:
- No Rust query engine binary is downloaded or shipped.
- The database connection pool is maintained by the native JavaScript database driver you install (e.g.,
@prisma/adapter-pg
for PostgreSQL).
This setup can help if you are:
- Deploying to serverless functions or edge runtimes
- Running in read-only filesystem environments
- Working within CI/CD pipelines with strict size limits
Visit this page for complete setup instructions and supported databases. Curious why we're moving away from the Rust engine? Take a look at why we're transitioning from Rust binary engines to an all-TypeScript approach for a faster, lighter Prisma ORM in our blog post.