Installing prepoly
Here we describe how to build and install the prepoly command-line driver.
Clone the repository
Section titled “Clone the repository”First, clone the prepoly source code:
git clone https://github.com/cordx56/prepoly.gitInstall the Rust compiler
Section titled “Install the Rust compiler”prepoly is written in the Rust language. So first you have to install the Rust compiler.
You can learn how to install Rust here: https://rust-lang.org/tools/install/
Build prepoly with the native runtime
Section titled “Build prepoly with the native runtime”After installing Rust, you can build the default native driver:
./x cargo build --releaseThe script x builds the bootstrap crate and executes commands via the bootstrap binary.
The bootstrap binary downloads LLVM, which is required to use JIT compilation, and sets its path for the prepoly build.
The resulting binary prepoly is made under the target/release directory.
If you want the interpreter-only driver without LLVM, disable default features:
cargo build -p prepoly_driver --no-default-featuresInstall prepoly
Section titled “Install prepoly”Run the following command to install the default native driver:
./x cargo install --path crates/prepoly_driverNote that you have to add the path where the prepoly binary is placed to $PATH.
prepoly program.pp # type-check and run a programprepoly check program.pp # type-check only; prints `ok` on successprepoly repl program.pp # run a program with the interpreter (no JIT)prepoly # start an interactive REPLAny diagnostic (parse error, type error) is printed to stderr and the process exits with a non-zero status; nothing is executed unless the whole program checks.