Wasm panel modules, widget host, merged plasmoid host design, and shell/UI work

Panel and wasm host
- The panel is built from wasm plasmoid modules (compositor/wasm: wasmer-backed host).
  Modules get capabilities by importing host interfaces; the host publishes data tables
  and serves a request queue (launch, focus window, set layout, inspector, load/unload
  modules). New WIT: windows, layout-control, inspector, modules, system.
- Merged two competing host designs: generic tables + requests are the base; the
  `system` snapshot and the id-stable `windows.all/focus` (Desktop Pulse) run on top of it.
- Panel widgets: load a .wasm from a path or file chooser, reorder by dragging,
  right-click replace/remove/add, saved to panel.edn.
- Desktop widget, system sampler (sysinfo), app catalog/humanised names, Interface
  Explorer (inspector), real font rendering (compositor/font, assets/fonts).

Compositor
- Drag the divider between tiled windows; lower tiled rows leave room for the title bar.
- Title-bar buttons, 12-hour clock, truncated titles, task-list/layout menus.
- DRM/KMS session, tcc debug builds (vendored tinycc incl. conftest.c), justfile
  recipes (modules, run, test), pixi.toml.

Known gaps
- The sources for the pulse, tasks, layout, inspector, module-manager, moon-* and
  clock-digital12 modules are not in the tree yet, so `just modules` stops at pulse and
  the host tests that load those modules fail until they land.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Sonnet 5.5 committed 2026-11-24 23:38:05 -08:00
1 parent 080377fd79
commit 0145981c6a
57 files changed
+11461 -221

No files matched your search

+29 -9
View File
@@ -26,6 +26,10 @@ tcc-build:
make -j"$(nproc)" >/dev/null
make install >/dev/null
# Build the panel's wasm modules (application menu, task list, clock, ...) into build/components.
modules:
scripts/build-modules.sh
# Debug build of the native compositor, compiled and linked with the vendored tcc.
build: tcc-build
MOON_CC={{tcc}} MOON_STUB_CC={{tcc}} moon build --target native --warn-list -a compositor/bin
@@ -35,22 +39,38 @@ build-release:
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
run: build modules
rm -f {{socket}}
{{exe}} --window --socket {{socket}} --theme {{theme}}
# Rebuild the Desktop Pulse plasmoid (wasm component) into compositor/wasm/testdata.
build-pulse:
moon build --target wasm --release
wasm-tools component embed wit _build/wasm/release/build/components/pulse/gen/gen.wasm --world pulse-widget --encoding utf16 -o _build/pulse.embed.wasm
wasm-tools component new _build/pulse.embed.wasm -o compositor/wasm/testdata/pulse.component.wasm
wasm-tools component targets --world pulse-widget wit compositor/wasm/testdata/pulse.component.wasm
# Run the compositor in a window with the Desktop Pulse widget loaded (live system + window integration).
run-pulse: build
rm -f {{socket}}
{{exe}} --window --socket {{socket}} --theme {{theme}} --widget compositor/wasm/testdata/pulse.component.wasm
# One frame of the desktop with Desktop Pulse loaded, to _build/pulse.png.
view-pulse: build
{{exe}} --socket {{socket}}-snap --theme {{theme}} --widget compositor/wasm/testdata/pulse.component.wasm --gfx-out _build/pulse.png
# Run the compositor with no window (clients only; no output).
run-headless: build
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
run-drm: 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
install-session: build-release modules
run0 python3 session/install.py
# Remove the login session again.
@@ -62,12 +82,12 @@ 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
test: modules
XDG_CONFIG_HOME="$(mktemp -d)" MOON_PLASMA_TEST_CONFIG=1 moon test --target native --warn-list -a compositor/renderer compositor/wasm compositor/host
moon test --target wasm --warn-list -a lib/shell lib/panel lib/clock lib/launcher lib/wm lib/taskbar lib/layoutpick lib/modmgr
# Render one composed frame to _build/e2e_frame.png (via the e2e test).
frame:
frame: modules
moon test --target native --warn-list -a compositor/host
@echo "wrote _build/e2e_frame.png"
@@ -76,6 +96,6 @@ ci:
scripts/test.sh
# Render one frame of the desktop to _build/desktop.png and open it.
view: build
view: build modules
{{exe}} --socket {{socket}}-snap --theme {{theme}} --gfx-out _build/desktop.png
xdg-open _build/desktop.png