From f14a1900afa758c427a29cc165579831689ed4eb Mon Sep 17 00:00:00 2001 From: nandi Date: Tue, 1 Dec 2026 15:10:57 -0800 Subject: [PATCH] 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 --- justfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/justfile b/justfile index 2fe115c..7f8dc27 100644 --- a/justfile +++ b/justfile @@ -21,6 +21,19 @@ prove: # 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"; \