# No Rust engine (Prisma ORM v6) (/docs/orm/v6/prisma-client/setup-and-configuration/no-rust-engine)

Learn how to use Prisma ORM without Rust engines

Location: ORM > v6 > Prisma Client > Setup and Configuration > No Rust engine

As of [v6.16.0](https://pris.ly/release/6.16.0), usage of Prisma ORM without [Rust engine](/guides/more-4-v6-more-internals-engines) binaries on PostgreSQL, CockroachDB, Neon, MySQL, PlanetScale, SQLite, D1 & MS SQL Server databases has been [Generally Available](/guides/more-4-v6-more-releases#generally-available-ga).

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](/guides/core-concepts-v6-overview-databases-database-drivers#driver-adapters) for database connection management

> \[!WARNING]
> The Rust-free version of Prisma ORM has been thoroughly tested with the `prisma-client` generator (see below), not with `prisma-client-js`. Use the old generator at your discretion.

## Usage

### Prerequisites

- Prisma ORM v6.15.0 (or later)

### 1. Set `engineType` on the `generator` block

```prisma title="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:

#### bun

```bash
bunx prisma generate
```

#### pnpm

```bash
pnpm prisma generate
```

#### yarn

```bash
yarn prisma generate
```

#### npm

```bash
npx prisma generate
```

### 3. Install the driver adapter

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

#### PostgreSQL

````bash
    bun add @prisma/adapter-pg@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-pg@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-pg@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-pg@6.19.3
```

#### SQLite

````bash
    bun add @prisma/adapter-better-sqlite3@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-better-sqlite3@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-better-sqlite3@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-better-sqlite3@6.19.3
```

#### D1

````bash
    bun add @prisma/adapter-d1@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-d1@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-d1@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-d1@6.19.3
```

#### MySQL/MariaDB

````bash
    bun add @prisma/adapter-mariadb@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-mariadb@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-mariadb@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-mariadb@6.19.3
```

#### PlanetScale

````bash
    bun add @prisma/adapter-planetscale@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-planetscale@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-planetscale@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-planetscale@6.19.3
```

#### MSSQL

````bash
    bun add @prisma/adapter-mssql@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-mssql@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-mssql@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-mssql@6.19.3
```

#### CockroachDB

````bash
    bun add @prisma/adapter-pg@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-pg@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-pg@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-pg@6.19.3
```

#### Neon Serverless

````bash
    bun add @prisma/adapter-neon@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-neon@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-neon@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-neon@6.19.3
```

### 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:

#### PostgreSQL

```typescript
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 })
```

#### SQLite

```typescript
import { PrismaBetterSqlite3 } from '@prisma/adapter-better-sqlite3';
import { PrismaClient } from '../generated/prisma/client';

const adapter = new PrismaBetterSqlite3({ url: process.env.DATABASE_URL })
const prisma = new PrismaClient({ adapter });
```

#### D1

```typescript
import { PrismaClient } from '../generated/prisma/client'
import { PrismaD1 } from '@prisma/adapter-d1'

export interface Env {
  DB: D1Database
}

export default {
  async fetch(
    request: Request,
    env: Env,
    ctx: ExecutionContext
  ): Promise<Response> {
    const adapter = new PrismaD1(env.DB)
    const prisma = new PrismaClient({ adapter })
    // …
    // ... query your DB
  },
}
```

#### MySQL/MariaDB

```typescript
import { PrismaMariaDb } from '@prisma/adapter-mariadb';
import { PrismaClient } from '../generated/prisma/client';

const adapter = new PrismaMariaDb({
host: "localhost",
port: 3306,
connectionLimit: 5
});
const prisma = new PrismaClient({ adapter });
```

#### PlanetScale

```typescript
import { PrismaPlanetScale } from '@prisma/adapter-planetscale'
import { PrismaClient } from '../generated/prisma/client'
import { fetch as undiciFetch } from 'undici'

const adapter = new PrismaPlanetScale({ url: process.env.DATABASE_URL, fetch: undiciFetch })
const prisma = new PrismaClient({ adapter })
```

#### MSSQL

```typescript
import { PrismaMssql } from '@prisma/adapter-mssql';
import { PrismaClient } from '../generated/prisma/client';

const sqlConfig = {
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
server: process.env.HOST,
pool: {
max: 10,
min: 0,
idleTimeoutMillis: 30000
},
options: {
encrypt: true, // for azure
trustServerCertificate: false // change to true for local dev / self-signed certs
}
}

const adapter = new PrismaMssql(sqlConfig)
const prisma = new PrismaClient({ adapter });
```

#### CockroachDB

```typescript
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 })
```

#### Neon Serverless

```typescript
import { PrismaClient } from '../generated/prisma/client'
import { PrismaNeon } from '@prisma/adapter-neon'
import dotenv from 'dotenv'

dotenv.config()
const connectionString = `${process.env.DATABASE_URL}`

const adapter = new PrismaNeon({ connectionString })
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](/guides/introduction-2-postgres) through the [Prisma Postgres serverless driver](/guides/database-serverless-driver). This requires `@prisma/adapter-ppg` instead of the Accelerate extension.

### 1. Set `engineType` on the `generator` block

```prisma title="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:

#### bun

```bash
bunx prisma generate
```

#### pnpm

```bash
pnpm prisma generate
```

#### yarn

```bash
yarn prisma generate
```

#### npm

```bash
npx prisma generate
```

### 3. Install and configure the Prisma Postgres adapter

Install the serverless driver adapter:

#### bun

```bash title="Terminal"
bun add @prisma/adapter-ppg @prisma/ppg
```

#### pnpm

```bash title="Terminal"
pnpm add @prisma/adapter-ppg @prisma/ppg
```

#### yarn

```bash title="Terminal"
yarn add @prisma/adapter-ppg @prisma/ppg
```

#### npm

```bash title="Terminal"
npm install @prisma/adapter-ppg @prisma/ppg
```

Import and instantiate Prisma Client with the adapter:

```typescript title="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.

> \[!WARNING]
> Existing Accelerate integrations
>
> Hosted Accelerate connections will be retired on December 1, 2026. Existing Prisma Postgres applications using `prisma+postgres://accelerate.prisma-data.net` should follow [Connect to Prisma Postgres without Accelerate](/guides/migrating-off-accelerate-postgres-database-switch-from-accelerate). For other databases, follow [Keep your existing database](/guides/migrating-off-accelerate-accelerate-keep-your-database).

## 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:

```prisma title="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:

#### bun

```bash
bunx prisma generate
```

#### pnpm

```bash
pnpm prisma generate
```

#### yarn

```bash
yarn prisma generate
```

#### npm

```bash
npx prisma generate
```

### 3. Install the driver adapter

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

#### PostgreSQL

````bash
    bun add @prisma/adapter-pg@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-pg@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-pg@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-pg@6.19.3
```

#### SQLite

````bash
    bun add @prisma/adapter-better-sqlite3@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-better-sqlite3@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-better-sqlite3@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-better-sqlite3@6.19.3
```

#### D1

````bash
    bun add @prisma/adapter-d1@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-d1@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-d1@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-d1@6.19.3
```

#### MySQL/MariaDB

````bash
    bun add @prisma/adapter-mariadb@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-mariadb@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-mariadb@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-mariadb@6.19.3
```

#### PlanetScale

````bash
    bun add @prisma/adapter-planetscale@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-planetscale@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-planetscale@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-planetscale@6.19.3
```

#### MSSQL

````bash
    bun add @prisma/adapter-mssql@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-mssql@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-mssql@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-mssql@6.19.3
```

#### CockroachDB

````bash
    bun add @prisma/adapter-pg@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-pg@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-pg@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-pg@6.19.3
```

#### Neon Serverless

````bash
    bun add @prisma/adapter-neon@6.19.3
    ```

#### pnpm

```bash
pnpm add @prisma/adapter-neon@6.19.3
````

#### yarn

```bash
yarn add @prisma/adapter-neon@6.19.3
```

#### npm

```bash
npm install @prisma/adapter-neon@6.19.3
```

### 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.

#### PostgreSQL

```typescript
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 })
```

#### SQLite

```typescript
import { PrismaBetterSqlite3 } from '@prisma/adapter-better-sqlite3';
import { PrismaClient } from '../generated/prisma/client';

const adapter = new PrismaBetterSqlite3({ url: process.env.DATABASE_URL })
const prisma = new PrismaClient({ adapter });
```

#### D1

```typescript
import { PrismaClient } from '../generated/prisma/client'
import { PrismaD1 } from '@prisma/adapter-d1'

export interface Env {
  DB: D1Database
}

export default {
  async fetch(
    request: Request,
    env: Env,
    ctx: ExecutionContext
  ): Promise<Response> {
    const adapter = new PrismaD1(env.DB)
    const prisma = new PrismaClient({ adapter })

    // ... query your DB

},
}
```

#### MySQL/MariaDB

```typescript
import { PrismaMariaDb } from '@prisma/adapter-mariadb';
import { PrismaClient } from '../generated/prisma/client';

const adapter = new PrismaMariaDb({
  host: "localhost",
  port: 3306,
  connectionLimit: 5
});
const prisma = new PrismaClient({ adapter });
```

#### PlanetScale

```typescript
import { PrismaPlanetScale } from '@prisma/adapter-planetscale'
import { PrismaClient } from '../generated/prisma/client'
import { fetch as undiciFetch } from 'undici'

const adapter = new PrismaPlanetScale({ url: process.env.DATABASE_URL, fetch: undiciFetch })
const prisma = new PrismaClient({ adapter })
```

#### MSSQL

```typescript
import { PrismaMssql } from '@prisma/adapter-mssql';
import { PrismaClient } from '../generated/prisma/client';

const sqlConfig = {
  user: process.env.DB_USER,
  password: process.env.DB_PASSWORD,
  database: process.env.DB_NAME,
  server: process.env.HOST,
  pool: {
    max: 10,
    min: 0,
    idleTimeoutMillis: 30000
  },
  options: {
    encrypt: true, // for azure
    trustServerCertificate: false // change to true for local dev / self-signed certs
  }
}

const adapter = new PrismaMssql(sqlConfig)
const prisma = new PrismaClient({ adapter });
```

#### CockroachDB

```typescript
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 })
```

#### Neon Serverless

```typescript
import { PrismaClient } from '../generated/prisma/client'
import { PrismaNeon } from '@prisma/adapter-neon'
import dotenv from 'dotenv'

dotenv.config()
const connectionString = `${process.env.DATABASE_URL}`

const adapter = new PrismaNeon({ connectionString })
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.

## Related pages

- [`Configuring error formatting`](/guides/prisma-client-v6-setup-and-configuration-error-formatting): This page explains how to configure the formatting of errors when using Prisma Client.
- [`Custom model and field names`](/guides/prisma-client-v6-setup-and-configuration-custom-model-and-field-names): Learn how you can decouple the naming of Prisma models from database tables to improve the ergonomics of the generated Prisma Client API.
- [`Database connections`](/guides/prisma-client-v6-setup-and-configuration-databases-connections): Databases connections
- [`Database polyfills`](/guides/prisma-client-v6-setup-and-configuration-database-polyfills): Prisma Client provides features that are not achievable with relational databases. These features are referred to as "polyfills" and explained on this page.
- [`Generating Prisma Client`](/guides/prisma-client-v6-setup-and-configuration-generating-prisma-client): This page explains how to generate Prisma Client. It also provides additional context on the generated client, typical workflows and Node.js configuration.

## Related pages

- [Authentication & Tools](./authentication-tools-index.md)
- [Build](./build-index.md)
- [Changelog](../changelog.md)
- [Concepts](./concepts-index.md)
- [Console commands](./console-commands-index.md)
- [Contract Authoring](./contract-authoring-index.md)
- [Core Concepts](./core-concepts-index.md)
- [Data Modeling](./data-modeling-index.md)
- [Database](./database-index.md)
- [DB commands](./db-commands-index.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
