Prisma ORM 8 is here.Read the docs
Setup and Configuration

No Rust engine

Prisma ORM v6

Learn how to use Prisma ORM without Rust engines

As of v6.16.0, usage of Prisma ORM without Rust engine binaries on PostgreSQL, CockroachDB, Neon, MySQL, PlanetScale, SQLite, D1 & MS SQL Server databases has been Generally Available.

This page gives an overview of how to use this version of Prisma ORM.

Prisma ORM without Rust engines

The main technical differences if you're using Prisma ORM without a Rust engine are:

  • no binaryTargets field on the generator block
  • no query engine binary that's downloaded into the directory with your generated Prisma Client
  • engineType needs to be set to "client" on the generator block
  • required usage of driver adapters for database connection management

Usage

Prerequisites

  • Prisma ORM v6.15.0 (or later)

1. Set engineType on the generator block

schema.prisma
generator client {
  provider        = "prisma-client" // or `prisma-client-js`
  output          = "../generated/prisma"
  engineType      = "client" // enable Prisma ORM without Rust
}

2. Re-generate Prisma Client

To make the configuration take effect, you need re-generate Prisma Client:

bunx prisma generate

3. Install the driver adapter

Depending on the database you use, you need to install a different driver adapter library:

bun add @prisma/adapter-pg

4. Instantiate Prisma Client

Finally, instantiate Prisma Client which you can do using the driver adapter and the connection URL for the database instance you're using:

import { PrismaPg } from '@prisma/adapter-pg'
import { PrismaClient } from '../generated/prisma/client'

const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
const prisma = new PrismaClient({ adapter })

5. Query your database

If you went through the previous steps, you can query your database as you're used to with Prisma Client. No other changes are needed.

Usage with Prisma Postgres

Use the Rust-free version of Prisma ORM with hosted Prisma Postgres through the Prisma Postgres serverless driver. This requires @prisma/adapter-ppg instead of the Accelerate extension.

1. Set engineType on the generator block

schema.prisma
generator client {
  provider        = "prisma-client" // or `prisma-client-js`
  output          = "../generated/prisma"
  engineType      = "client" // enable Prisma ORM without Rust
}

2. Re-generate Prisma Client

To make the configuration take effect, you need re-generate Prisma Client:

bunx prisma generate

3. Install and configure the Prisma Postgres adapter

Install the serverless driver adapter:

Terminal
bun add @prisma/adapter-ppg @prisma/ppg

Import and instantiate Prisma Client with the adapter:

src/lib/prisma.ts
import { PrismaPostgresAdapter } from "@prisma/adapter-ppg";
import { PrismaClient } from "../../generated/prisma/client";

const adapter = new PrismaPostgresAdapter({
  connectionString: process.env.DATABASE_URL!,
});

const prisma = new PrismaClient({ adapter });

4. Query your database

If you went through the previous steps, you can query your database as you're used to with Prisma Client. No other changes are needed.

Usage with older versions (Preview)

The Rust-free version of Prisma ORM has been in Preview from versions v6.7.0 to v.6.14.0. Expand below if you're using any of these versions and are unable to upgrade to the latest one.

Expand to see instructions for Prisma ORM v6.7.0 to v6.14.0

Prerequisites

  • Any Prisma ORM version between 6.7.0 and 6.14.0

1. Set feature flags

Usage of the new architecture requires the driverAdapters and queryCompiler feature flags to be set:

schema.prisma
generator client {
  provider        = "prisma-client"
  previewFeatures = ["queryCompiler", "driverAdapters"]
  output          = "../generated/prisma"
}

2. Re-generate Prisma Client

To make the feature flags take effect, you need re-generate Prisma Client:

bunx prisma generate

3. Install the driver adapter

Depending on the database you use, you need to install a different driver adapter library:

bun add @prisma/adapter-pg

4. Instantiate Prisma Client

Finally, you need to instantiate Prisma Client which you can do using the driver adapter and the connection URL for the database instance you're using.

import { PrismaPg } from '@prisma/adapter-pg'
import { PrismaClient } from '../generated/prisma/client'

const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
const prisma = new PrismaClient({ adapter })

5. Query your database

If you went through the previous steps, you can query your database as you're used to with Prisma Client. No other changes are needed.

On this page