An auto-generated and type-safe query builder in rust for Prisma
-
Create a valid prisma schema file
prisma/schema.prismain your project root i.e. the newly created folderprismaand yoursrcfolder should be siblings. -
Update your dependencies in the
Cargo.tomlfile to includeprisma-client-rsandserde.[dependencies] ... prisma-client = { git = "https://github.com/polytope-labs/prisma-client-rs", branch = "master" } serde = { version = "1.0", features = ["serde_derive"] }
-
Create the
.cargo/config.tomlin your project root and add the following:[env] PRISMA_SCHEMA=ABSOLUTE/PATH/TO/SCHEMA/FILE/HERE -
Go through the example in the
examplefolder to see how to use the client.