From ccb809bdc326c26fafa7aff2519e8d097ceddb35 Mon Sep 17 00:00:00 2001 From: nandithebull Date: Tue, 24 Nov 2026 18:51:22 -0800 Subject: [PATCH] Add justfile with build, run, client, test, frame, ci recipes Co-Authored-By: Claude Sonnet 5.5 --- justfile | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 0000000..ca624b0 --- /dev/null +++ b/justfile @@ -0,0 +1,38 @@ +# moon-plasma tasks. `just` lists them. +set shell := ["bash", "-euo", "pipefail", "-c"] + +export PATH := env_var('HOME') + "/.moon/bin:" + env_var('PATH') + +socket := env_var_or_default('XDG_RUNTIME_DIR', '/tmp') + "/wayland-moon-0" +theme := "config/themes/moon-night.json" +exe := "_build/native/debug/build/compositor/bin/bin.exe" + +default: + @just --list + +# Build the native compositor. +build: + moon build --target native --warn-list -a compositor/bin + +# Run the compositor (Ctrl-C to stop). Connect clients via `just client`. +run: build + rm -f {{socket}} + {{exe}} --socket {{socket}} --theme {{theme}} + +# Start a Wayland client inside the running compositor (default: foot). +client *cmd="foot": + WAYLAND_DISPLAY={{socket}} {{cmd}} + +# Compositor + wasm component + lib tests. +test: + moon test --target native --warn-list -a compositor/renderer compositor/host + moon test --target wasm --warn-list -a lib/shell lib/panel lib/clock lib/launcher lib/wm + +# Render one composed frame to _build/e2e_frame.png (via the e2e test). +frame: + moon test --target native --warn-list -a compositor/host + @echo "wrote _build/e2e_frame.png" + +# Everything CI runs. +ci: + scripts/test.sh