Prisma Rust Schema
Usage
Binary
- Install the binary
- Add the generator config to your
.prismafile:
generator prisma_rust_schema {
provider = "prisma-rust-schema"
output = "./src/prisma"
}
- Run the generator
- Use the generated code in your Rust project:
use MyModel;
Library
This crate exports the internal TypeScript types from prisma/prisma.
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