As of [v6.16.0](https://pris.ly/release/6.16.0), usage of Prisma ORM without [Rust engine](/orm/more/under-the-hood/engines) binaries on PostgreSQL, CockroachDB, Neon, MySQL, PlanetScale, SQLite, D1 & MS SQL Server databases has been [Generally Available](/orm/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](/orm/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 file=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:

```terminal
npx prisma generate
```

### 3. Install the driver adapter

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

<TabbedContent code>
<TabItem value="PostgreSQL">
```terminal
npm install @prisma/adapter-pg
```
</TabItem>
<TabItem value="SQLite">
```terminal
npm install @prisma/adapter-better-sqlite3
```
</TabItem>
<TabItem value="D1">
```terminal
npm install @prisma/adapter-d1
```
</TabItem>
<TabItem value="MySQL/MariaDB">
```terminal
npm install @prisma/adapter-mariadb
```
</TabItem>
<TabItem value="PlanetScale">
```terminal
npm install @prisma/adapter-planetscale
```
</TabItem>
<TabItem value="MSSQL">
```terminal
npm install @prisma/adapter-mssql
```
</TabItem>
<TabItem value="CockroachDB">
```terminal
npm install @prisma/adapter-pg
```
</TabItem>
<TabItem value="Neon Serverless">
```terminal
npm install @prisma/adapter-neon
```
</TabItem>
</TabbedContent>

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

<TabbedContent code>
<TabItem value="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 })
```
</TabItem>
<TabItem value="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 });
```
</TabItem>
<TabItem value="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
  },
}
```
</TabItem>
<TabItem value="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 });
```
</TabItem>
<TabItem value="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 })
```
</TabItem>
<TabItem value="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 });
```
</TabItem>
<TabItem value="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 })
```
</TabItem>
<TabItem value="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 })
```
</TabItem>
</TabbedContent>

### 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 Accelerate or Prisma Postgres

When using the Rust-free version of Prisma ORM with [Prisma Accelerate](/accelerate) or [Prisma Postgres](/postgres), you **should not** use driver adapters. Instead, you can directly instantiate Prisma Client with the appropriate extension.

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

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

```terminal
npx prisma generate
```

### 3. Instantiate Prisma Client with Accelerate

Import and instantiate Prisma Client with the Accelerate extension:

```typescript
import { PrismaClient } from "../generated/prisma/client";
import { withAccelerate } from "@prisma/extension-accelerate";

const prisma = new PrismaClient().$extends(withAccelerate());
```
### 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.

<details>

<summary>Expand to see instructions for Prisma ORM v6.7.0 to v6.14.0</summary>

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

```terminal
npx prisma generate
```

### 3. Install the driver adapter

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

<TabbedContent code>
<TabItem value="PostgreSQL">
```terminal
npm install @prisma/adapter-pg
```
</TabItem>
<TabItem value="SQLite">
```terminal
npm install @prisma/adapter-better-sqlite3
```
</TabItem>
<TabItem value="D1">
```terminal
npm install @prisma/adapter-d1
```
</TabItem>
<TabItem value="MySQL/MariaDB">
```terminal
npm install @prisma/adapter-mariadb
```
</TabItem>
<TabItem value="PlanetScale">
```terminal
npm install @prisma/adapter-planetscale
```
</TabItem>
<TabItem value="MSSQL">
```terminal
npm install @prisma/adapter-mssql
```
</TabItem>
<TabItem value="CockroachDB">
```terminal
npm install @prisma/adapter-pg
```
</TabItem>
<TabItem value="Neon Serverles">
```terminal
npm install @prisma/adapter-neon
```
</TabItem>
</TabbedContent>

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

<TabbedContent code>
<TabItem value="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 })
```
</TabItem>
<TabItem value="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 });
```
</TabItem>
<TabItem value="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
  },
}
```
</TabItem>
<TabItem value="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 });
```
</TabItem>
<TabItem value="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 })
```
</TabItem>
<TabItem value="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 });
```
</TabItem>
<TabItem value="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 })
```
</TabItem>
<TabItem value="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 })
```
</TabItem>
</TabbedContent>

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

</details>



---

# Setup & configuration