Saltar al contenido

prisma-engines

🚂 Engine components of Prisma 2+. This is copy of Brendonovich/prisma-engines

prisma-engines es un proyecto de código abierto de Yaroslav Koval, escrito principalmente en Rust y publicado con la licencia Apache-2.0. Última actualización: 11 ene 2025. El código fuente está en GitHub.

  • Rust
Actualizado
Licencia
Apache-2.0
Estrellas
0
git clone https://github.com/koval01/prisma-engines.git

README

El README se muestra en su idioma original.

Prisma Engines

This repository contains a collection of engines that power the core stack for Prisma, most prominently Prisma Client and Prisma Migrate.

If you're looking for how to install Prisma or any of the engines, the Getting Started guide might be useful.

This document describes some of the internals of the engines, and how to build and test them.

What's in this repository

This repository contains four engines:

  • *Query engine*, used by the client to run database queries from Prisma Client
  • *Migration engine*, used to create and run migrations
  • *Introspection engine*, used to get the state of the database, compare it to the schema file, and figure out what the differences are
  • *Prisma Format*, used to format prisma files

Additionally, the *psl* (Prisma Schema Language) is the library that defines how the language looks like, how it's parsed, etc.

You'll also find: - *libs*, for various (small) libraries such as macros, user facing errors, various connector/database-specific libraries, etc. - a docker-compose.yml file that's helpful for running tests and bringing up containers for various databases - a flake.nix file for bringing up all dependencies and making it easy to build the code in this repository (the use of this file and nix is entirely optional, but can be a good and easy way to get started) - an .envrc file to make it easier to set everything up, including the nix shell

Documentation

The API docs (cargo doc) are published on our fabulous repo page.

Building Prisma Engines

Prerequisites:

  • Installed the stable Rust toolchain, at least version 1.52.0. You can get the toolchain at rustup or the package manager of your choice.
  • Linux only: OpenSSL is required to be installed.
  • Installed direnv, then direnv allow on the repository root.
  • Make sure direnv is hooked into your shell
  • Alternatively: Load the defined environment in ./.envrc manually in your shell.
  • For m1 users: Install Protocol Buffers

Note for nix users: it should be enough to direnv allow. How to build:

[... continued on GitHub]

Más proyectos

Todos los repositorios: github.com/koval01