prisma-rust-schema 0.1.0

A Rust binary to act as a Prisma generator, generating Rust code from Prisma schema files.
prisma-rust-schema-0.1.0 is not a library.
Visit the last successful build: prisma-rust-schema-0.2.1

Prisma Rust Schema

Usage

  1. Install the binary
cargo install prisma-rust-schema
  1. Add the generator config to your .prisma file:
generator prisma_rust_schema {
  provider = "prisma-rust-schema"
  output   = "./src/prisma"
}
  1. Run the generator
npx prisma generate
  1. Use the generated code in your Rust project:
use prisma::MyModel;

Constraints

Currently, all enums and structs generated have #[derive(Serialize, Deserialize, Debug)] and #[serde(rename_all = "camelCase")] attributes. In future versions, this will be configurable.

Development

npx prisma generate