Peeper

Build from source

Set up the toolchain, build the compiler and run a program.

Peeper is built from source for now. The build puts the compiler, its bundled library, its runtime and its own LLVM toolchain in the build/ folder.

Requirements

  • A Rust toolchain (cargo, with rustfmt and clippy).
  • curl, tar and jq for scripts/setup.sh; on Windows, PowerShell for scripts/setup.ps1.
  • On macOS, Xcode's command line tools (xcode-select --install): their SDK holds the C library and headers programs are built with.
  • On Windows, Git Bash, which runs scripts/build.sh.
  • Git.

Build

Get the source

git clone https://github.com/PeeperLanguage/compiler.git
cd compiler

Set up the toolchain

bash scripts/setup.sh        # on Windows: pwsh scripts/setup.ps1

This downloads the LLVM toolchain pack CI built for your machine, checks it against the size and SHA-256 pinned in toolchains/toolchains.lock.json, and puts it in build/toolchains/native. Peeper runs only that toolchain, never a clang on your PATH. Without a pack for your machine, the script links an installed LLVM 23 or newer instead.

Build the compiler

bash scripts/build.sh

Run a program

build/bin/peeper run examples/01_functions.peep

Platforms

CI builds and tests the compiler on each of these, and builds a toolchain pack for it:

SystemArchitectureToolchain
Linuxx86-64LLVM
LinuxARM64LLVM
macOSARM64LLVM
Windowsx86-64LLVM through llvm-mingw

On x86-64 Linux, -target i686-linux builds 32-bit programs too, with the 32-bit C library installed.

Commands

Commands lists every command and its options.

On this page