Move number parsing, version ordering and constraints, version sorting and solver literals into src/kernel, with contracts checked by moon prove under overflow-checked integers. Replace the semver behaviour tests with those proofs, keep tests for string parsing, and run the proofs in CI. Version numbers are now 64-bit: the old parser silently wrapped at 2^31. Drop pick_tag, which only tests called. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
870 B
Makefile
28 lines
870 B
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"
|
|
@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
|