Short answer
Prisma generates a custom TypeScript client from schema.prisma and translates calls into SQL. It used to run through a Rust binary engine; recent versions (available since 6.16 and the default in Prisma 7) use a TypeScript Query Compiler with driver adapters and no Rust engine.
Explanation
Prisma generates a typed client based on schema.prisma. When you call prisma.user.findMany(), the client builds a query plan that is then executed through the query engine. In the older architecture, the engine was a Rust binary running alongside the app, which increased bundle size and complicated deployment to Serverless and Edge environments. The modern Rust-free architecture replaces it with a Query Compiler that translates queries into SQL in the TypeScript runtime and connects to the database through a driver adapter (such as pg), reducing bundle size and startup time. In both architectures, include and select greatly reduce common N+1 problems when loading relations.
Code example
const users = await prisma.user.findMany({
where: { active: true },
include: { posts: true }
});Common mistakes
- Creating multiple PrismaClient instances in every file or function instead of sharing a single Singleton instance.