Our move from Rust to TypeScript in the Prisma ORM internals is now in Preview for all first-class databases! In this article, we’re sharing the performance improvements we observed in our latest benchmarks and give an outlook for Prisma v7 where the ORM will become “Rust-free” by default.
Prisma ORM without Rust engines is in Preview
Our move from Rust to TypeScript not only improves the developer experience, it also makes Prisma ORM more flexible and easier to use—whether you're working with different JavaScript runtimes, deployment platforms, or project setups like monorepos. On top of that, it brings significant performance improvements.
Over the past few releases, we’ve gradually rolled out Preview support for Prisma ORM for all major SQL databases supported by Prisma ORM. It’s now available for: PostgreSQL, CockroachDB, Neon, MySQL, MariaDB, PlanetScale, SQLite, D1 and MS SQL Server databases.
Our work on moving away from Rust continues with the goal of making “Rust-free” Prisma ORM the default in the upcoming Prisma v7 release. In this article, we are sharing an update on the performance improvements we’ve measured using the latest Rust-free Preview version of Prisma ORM.
Recap: Why move away from Rust?
We chose a Rust-based architecture initially because we wanted to make Prisma ORM available for various programming languages. Five years later, it has become clear that TypeScript is the dominant language for building web applications and the goal of supporting multiple languages has become secondary to providing the best DX possible for TypeScript developers.
With that in mind, our main reasons for moving away from Rust are:
- Lower bundle size: While we’ve managed to decrease it quite a bit over the past years, the engine binary still notably contributes to the bundle size of your application.
- Faster queries: The serialization across language boundaries makes queries (especially those returning larger sets of data) slower. Eliminating this overhead makes Prisma ORM notably faster.
- Lower CPU footprint: Running the query engine as a binary alongside your application causes extra CPU usage that will be eliminated by the Rust-free ORM version.
- Less deployment complexity: When deploying your app, the query engine binary needs to be compiled for the OS of your hosting provider. This extra step sometimes caused extra issues that are not going to be present with the engine-free Prisma ORM.
- Easier community contributions: Prisma ORM is open-source, but having a core written in Rust made it difficult for our community to make significant contributions to it. We’re excited that our move to TypeScript will lower the barrier for developers to contribute and are looking forward to collaborating more with our community.
If you want to learn more, you can check out our previous articles on this topic:
- From Rust to TypeScript: A New Chapter for Prisma ORM (January 30th)
- Rust to TypeScript Update: Boosting Prisma ORM Performance (March 3rd)
- Try the New "Rust-free" Version of Prisma ORM (Early Access) (April 30th)
Benchmark update: Rust-free Prisma ORM is faster
We continuously run benchmarks on the new releases of Prisma ORM in order to monitor any changes and prevent performance regressions as we continue the migration from Rust to TypeScript. You can find all details about our setup in the benchmark repo.
In the latest benchmark run, we found that for almost all queries that we tested, the performance improved compared to the prior Rust-based version of Prisma ORM:
Note: These benchmarks were created on a PostgreSQL database and the Rust-free Prisma ORM version uses the
pg
driver.
Overall, the Rust-free version of Prisma ORM delivers strong performance improvements—especially when working with large datasets. In our benchmarks, queries that returned a lot of data were consistently faster with the new TypeScript-based implementation.
For smaller queries, performance differences between the two versions are minimal. In some cases, the Rust-based version was slightly faster, but only when the absolute query time was already extremely low (e.g. 1–2 ms). These marginal gains are not meaningful in practice and don’t outweigh the broader benefits of the Rust-free version.
Our key takeaway is that Prisma ORM without Rust is often significantly faster where it matters most—on large and complex queries—while remaining on par for simpler ones.
Another benefit: The CPU footprint of the Rust-free Prisma ORM is notably reduced, as there's no longer a separate engine binary running alongside your app.
Get started with Rust-free Prisma ORM
If you read this and have become curious, here are the steps you need to follow to try out the Rust-free version of Prisma ORM:
-
Enable the
queryCompiler
anddriverAdapters
Preview feature flags in your Prisma schema:Note: The new internal component replacing the query engine is called query compiler, hence the name of the Preview feature flag.
-
Run
prisma generate
to re-generate Prisma Client -
Install a driver adapter for your database (e.g.
@prisma/adapter-pg
if you’re using PostgreSQL): -
You can instantiate
PrismaClient
as follows:
In the Rust-based version of Prisma ORM, you’ll find an engine binary file in your output
directory (or in node_modules
if you haven’t set a dedicated output
path). You can now check that you’re using the Rust-free version of Prisma ORM by validating that this binary file isn’t there. By the way, this will significantly decrease the bundle size of your entire application 🎉
Try it out and share your feedback
The Rust-free version of Prisma ORM is approaching General Availability and we’re excited that you can now try it out for any major database supported by Prisma ORM.
Follow the instructions above or try one of our ready-to-run example projects (which also use the new, ESM-first prisma-client
generator), for example:
- Next.js + Turborepo + Node.js
- Next.js in a monorepo
- React Router + Vite + Cloudflare
- Nuxt 3 + Vite + Nitro
- Deno Deploy
Share your feedback on Discord or ping us on X.
Don’t miss the next post!
Sign up for the Prisma Newsletter