Files
orbit/justfile
T
nandi f14a1900af
Rolling Release / build (push) Successful in 1m51s
Rolling Release / publish (push) Successful in 9s
Add debug build and install recipes
- Add build-debug for a faster, unoptimised native build
- Add install-debug to install that build to ~/.local/bin
- Move the PATH setup into a _path recipe shared by both installs
2026-12-01 15:10:57 -08:00

41 lines
1.2 KiB
Makefile

# List recipes.
default:
@just --list
# Build the release binary.
build:
moon build --target native --release
# Build a static binary with Zig's musl toolchain (dist/orbit-linux-x86_64).
build-musl:
scripts/build-musl.sh
# Run the unit tests.
test:
moon test --target native
# Prove src/kernel with overflow-checked integers (needs z3, cvc5 or alt-ergo).
prove:
MOON_PROVE_PRELUDE_OVERRIDE="${MOON_HOME:-$HOME/.moon}/lib/prelude_proof_machine_int" moon prove src/kernel
# Install Orbit to ~/.local/bin and set up its package PATH for Bash.
install: build
install -Dm755 _build/native/release/build/main/main.exe "$HOME/.local/bin/orbit"
@just _path
# Build without optimisation (much faster to compile than `build`).
build-debug:
moon build --target native
# Install the unoptimised build to ~/.local/bin, for trying out a change.
install-debug: build-debug
install -Dm755 _build/native/debug/build/main/main.exe "$HOME/.local/bin/orbit"
@just _path
# Add Orbit's package bin directory to PATH in ~/.bashrc, once.
_path:
@line='export PATH="${ORBIT_ROOT:-$HOME/.orbit}/bin:$PATH"'; rc="$HOME/.bashrc"; \
if [ ! -f "$rc" ] || ! grep -Fqx -- "$line" "$rc"; then \
printf '\n%s\n' "$line" >> "$rc"; \
fi