The wasm compositor as a login session: DRM/KMS + libinput through the host
CI / test (push) Failing after 1m13s
CI / test (push) Failing after 1m13s
New moonplasma:host/display import (open, poll, present, cursor, input events, close). The wasmtime host implements it by compiling the compositor's own kms shim (libseat + DRM/KMS + libinput + xkbcommon) via build.rs (feature drm, default on), so the native and wasm backends share one implementation. compositor/kms gets a wasm backend with the same API, and the shared app loop gains --drm. - session: install.py installs the host, compositor.wasm, fonts, config, wit and modules and the display-manager entry (--native keeps the old native session); the launcher starts the host when installed. just run-drm / install-session use the wasm compositor; *-native keep the old. - compositor.wasm moves to build/ (out of build/components, where the module catalog scans). Verified: component builds with the new import, host instantiates it and renders frames, installed layout (fonts/modules/theme from the share dir) renders correctly in a sandbox, native build and tests unchanged. NOT exercised on a real login VT. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
95b7275b3a
commit
c03d4c6c17
32 files changed
+862
-124
No files matched your search
@@ -42,7 +42,7 @@ build-release:
|
||||
# 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
|
||||
rm -f {{socket}}
|
||||
host-wasm/target/release/moon-plasma-host build/components/compositor.wasm --socket {{socket}} --theme {{theme}} --window
|
||||
host-wasm/target/release/moon-plasma-host build/compositor.wasm --socket {{socket}} --theme {{theme}} --window
|
||||
|
||||
# Run the native compositor (tcc debug build, with the wasm panel modules) in a window on your current Wayland session.
|
||||
run-native: build modules
|
||||
@@ -70,15 +70,24 @@ run-headless: build modules
|
||||
rm -f {{socket}}
|
||||
{{exe}} --socket {{socket}} --theme {{theme}}
|
||||
|
||||
# Run the compositor on the real display (DRM/KMS + libinput). Run from a login VT (Ctrl+Alt+F3), not inside another session. Ctrl+Alt+Backspace quits, Ctrl+Alt+F<n> switches VT.
|
||||
run-drm: build-release modules
|
||||
# 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
|
||||
rm -f {{socket}}
|
||||
host-wasm/target/release/moon-plasma-host build/compositor.wasm --drm --socket {{socket}} --theme {{theme}}
|
||||
|
||||
# The same on the native compositor (system-cc release build), for comparison.
|
||||
run-drm-native: build-release modules
|
||||
rm -f {{socket}}
|
||||
{{release_exe}} --drm --socket {{socket}} --theme {{theme}}
|
||||
|
||||
# Install the Moon Plasma login session (display-manager entry); asks for root once.
|
||||
install-session: build-release modules
|
||||
# Install the Moon Plasma login session (display-manager entry): the wasm compositor + its host. Asks for root once.
|
||||
install-session: compositor-wasm host-wasm modules
|
||||
run0 python3 session/install.py
|
||||
|
||||
# Install the login session with the native compositor instead.
|
||||
install-session-native: build-release modules
|
||||
run0 python3 session/install.py --native
|
||||
|
||||
# Remove the login session again.
|
||||
uninstall-session:
|
||||
run0 python3 session/install.py --remove
|
||||
@@ -122,7 +131,7 @@ clean:
|
||||
clean-all:
|
||||
rm -rf _build build
|
||||
|
||||
# Build the compositor as a wasm component (build/components/compositor.wasm): imports only moonplasma:host/sys.
|
||||
# Build the compositor as a wasm component (build/compositor.wasm): imports only moonplasma:host/sys.
|
||||
compositor-wasm:
|
||||
scripts/build-compositor-wasm.sh
|
||||
|
||||
|
||||
Reference in new issue
Block a user