Make the MoonBit host the default: just run, run-drm and install-session use build/wasmhost
CI / test (push) Failing after 17s
CI / test (push) Failing after 17s
The Rust host stays as a fallback: just run-rust, run-drm-rust, install-session-rust (session/install.py --rust-host). build-wasmhost.sh fetches the wasmtime C API when it is missing and replaces build/wasmhost by renaming, so a running dev session keeps its copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hiNfjrw2edja7LiRLB
This commit is contained in:
6 files changed
+65
-32
No files matched your search
@@ -39,8 +39,13 @@ build:
|
||||
build-release:
|
||||
moon build --target native --release --warn-list -a compositor/bin
|
||||
|
||||
# Run the compositor, built as a wasm component, in a window on your current Wayland session (close the window or Ctrl-C to stop). Connect clients via `just client`. The panel is empty until panel modules run in the component; `just run-native` has them.
|
||||
run: compositor-wasm host-wasm modules
|
||||
# Run the compositor, built as a wasm component, in a window on your current Wayland session (close the window or Ctrl-C to stop). Connect clients via `just client`.
|
||||
run: compositor-wasm wasmhost modules
|
||||
rm -f {{socket}}
|
||||
build/wasmhost build/compositor.wasm --socket {{socket}} --theme {{theme}} --window
|
||||
|
||||
# The same on the Rust host (host-wasm), kept as a fallback while the MoonBit host settles in.
|
||||
run-rust: compositor-wasm host-wasm modules
|
||||
rm -f {{socket}}
|
||||
host-wasm/target/release/chandra-host build/compositor.wasm --socket {{socket}} --theme {{theme}} --window
|
||||
|
||||
@@ -71,10 +76,16 @@ run-headless: build modules
|
||||
{{exe}} --socket {{socket}} --theme {{theme}}
|
||||
|
||||
# Run the wasm compositor on the real display (DRM/KMS + libinput, through the host). Run from a login VT (Ctrl+Alt+F3), not inside another session. Ctrl+Alt+Backspace quits, Ctrl+Alt+F<n> switches VT.
|
||||
run-drm: compositor-wasm host-wasm modules
|
||||
run-drm: compositor-wasm wasmhost modules
|
||||
rm -f {{socket}}
|
||||
# Let D-Bus-activated helpers (gcr-prompter's keyring unlock prompt, portals) open windows here.
|
||||
-dbus-update-activation-environment --systemd WAYLAND_DISPLAY=$(basename {{socket}}) XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=chandra 2>/dev/null
|
||||
build/wasmhost build/compositor.wasm --drm --socket {{socket}} --theme {{theme}}
|
||||
|
||||
# The same on the Rust host (host-wasm).
|
||||
run-drm-rust: compositor-wasm host-wasm modules
|
||||
rm -f {{socket}}
|
||||
-dbus-update-activation-environment --systemd WAYLAND_DISPLAY=$(basename {{socket}}) XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=chandra 2>/dev/null
|
||||
host-wasm/target/release/chandra-host build/compositor.wasm --drm --socket {{socket}} --theme {{theme}}
|
||||
|
||||
# The same on the native compositor (system-cc release build), for comparison.
|
||||
@@ -83,14 +94,18 @@ run-drm-native: build-release modules
|
||||
-dbus-update-activation-environment --systemd WAYLAND_DISPLAY=$(basename {{socket}}) XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=chandra 2>/dev/null
|
||||
{{release_exe}} --drm --socket {{socket}} --theme {{theme}}
|
||||
|
||||
# Install the Chandra login session (display-manager entry): the wasm compositor + its host. Asks for root once.
|
||||
install-session: compositor-wasm host-wasm modules
|
||||
# Install the Chandra login session (display-manager entry): the wasm compositor + its host (the MoonBit host). Asks for root once.
|
||||
install-session: compositor-wasm wasmhost modules
|
||||
run0 python3 session/install.py
|
||||
|
||||
# Dev install: symlink the session into this checkout, so after one root install `just compositor-wasm host-wasm modules` is all a rebuild needs.
|
||||
install-session-dev: compositor-wasm host-wasm modules
|
||||
# Dev install: symlink the session into this checkout, so after one root install `just compositor-wasm wasmhost modules` is all a rebuild needs.
|
||||
install-session-dev: compositor-wasm wasmhost modules
|
||||
run0 python3 session/install.py --link
|
||||
|
||||
# Install the login session with the Rust host (host-wasm) instead of the MoonBit one.
|
||||
install-session-rust: compositor-wasm host-wasm modules
|
||||
run0 python3 session/install.py --rust-host
|
||||
|
||||
# Install the login session with the native compositor instead.
|
||||
install-session-native: build-release modules
|
||||
run0 python3 session/install.py --native
|
||||
@@ -146,12 +161,11 @@ clean-all:
|
||||
compositor-wasm:
|
||||
scripts/build-compositor-wasm.sh
|
||||
|
||||
# Build the native host that runs the compositor component (wasmtime; implements the sys imports).
|
||||
host-wasm:
|
||||
cd host-wasm && cargo build --release
|
||||
|
||||
# Build the MoonBit host for the compositor component (build/wasmhost): links the prebuilt wasmtime
|
||||
# C API instead of compiling wasmtime. Work in progress: it will replace host-wasm.
|
||||
# Build the host that runs the compositor component (build/wasmhost): MoonBit, linking the prebuilt wasmtime C API, so it builds in seconds.
|
||||
wasmhost:
|
||||
scripts/build-wasmhost.sh
|
||||
|
||||
# Build the Rust host (host-wasm/target/release/chandra-host): the fallback, compiles wasmtime (about 2 minutes cold).
|
||||
host-wasm:
|
||||
cd host-wasm && cargo build --release
|
||||
|
||||
Reference in new issue
Block a user