Files
chandra/justfile
T
nandiandClaude Sonnet 5.5 a1b85474f8
CI / test (push) Successful in 26s
Nested window backend: run the compositor in a window on the host Wayland session
The compositor opens an xdg_toplevel on $WAYLAND_DISPLAY, presents frames via
wl_shm with frame-callback pacing and forwards host pointer input to the gfx
surface. just run now uses it (release build); run-headless keeps the old mode.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 19:06:51 -08:00

50 lines
1.7 KiB
Makefile

# 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/release/build/compositor/bin/bin.exe"
debug_exe := "_build/native/debug/build/compositor/bin/bin.exe"
default:
@just --list
# Build the native compositor (release: the software rasteriser is slow in debug).
build:
moon build --target native --release --warn-list -a compositor/bin
# Run the compositor in a window on your current Wayland session (close the window or Ctrl-C to stop). Connect clients via `just client`.
run: build
rm -f {{socket}}
{{exe}} --window --socket {{socket}} --theme {{theme}}
# Run the compositor with no window (clients only; no output).
run-headless: 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
# Render one frame of the desktop to _build/desktop.png and open it.
view: build
{{exe}} --socket {{socket}}-snap --theme {{theme}} --gfx-out _build/desktop.png
xdg-open _build/desktop.png