prisma-engines
🚂 Engine components of Prisma 2+. This is copy of Brendonovich/prisma-engines
prisma-engines — проєкт з відкритим кодом, автор Ярослав Коваль. Основна мова: Rust. Ліцензія: Apache-2.0. Останнє оновлення: 11 січ. 2025 р. Вихідний код доступний на GitHub.
- Rust
- Оновлено
- Ліцензія
- Apache-2.0
- Зірки
- 0
git clone https://github.com/koval01/prisma-engines.gitREADME
README показано мовою оригіналу.
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 allowon the repository root. - Make sure direnv is hooked into your shell
- Alternatively: Load the defined environment in
./.envrcmanually 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]