Add a pixi `modules` task that runs scripts/build-modules.sh. The justfile
`modules` recipe calls it, and `run` now depends on `modules` so the panel
has its wasm modules when the compositor starts.
Drop pulse, clock-digital12, moon-disc and moon-text from components.txt.
They had no source in any branch, so the build skipped them every time.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Add seatd (libseat headers and library) to the pixi workspace, so the
host-wasm build no longer needs a system libseat. Set channel priority
to disabled so the solver can resolve seatd's libsystemd0 dependency.
Activation env points CPATH, LIBRARY_PATH and LD_LIBRARY_PATH at the
pixi prefix. The justfile runs every recipe through `pixi run`, so a
plain `just run` builds and launches against the pixi environment.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
moon-plasma / moonplasma / MoonPlasma / Moon Plasma become chandra / Chandra
everywhere: the WIT package (chandra:desktop, chandra:host, chandra:wm), the
MoonBit module (chandra/desktop) and generated bindings, the Rust host,
identifiers (ChandraCompositor), the session script (chandra-session) and
desktop entry (chandra.desktop), config and data paths
($XDG_CONFIG_HOME/chandra, share/chandra/modules), env vars (CHANDRA_*),
UI strings, docs and tests. The test fixture components are rebuilt against
the renamed WIT.
Saved panel.edn and state.edn are still read from the old
$XDG_CONFIG_HOME/moon-plasma until the first save writes the new copy.
The remote repository keeps its experiments/moon-plasma name for now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hi3L9oVBoRd373Qr4n
As a login session, launched apps were put on a private dbus-daemon bus (meant
only to stop single-instance apps forwarding to a host session when nested).
That bus has no org.freedesktop.secrets, so apps D-Bus-activated a second,
locked gnome-keyring-daemon on it: unlock prompts / "create default keyring"
dialogs, even though pam_gnome_keyring had already unlocked the login keyring.
The session script also wrapped everything in dbus-run-session whenever
DBUS_SESSION_BUS_ADDRESS was unset, splitting off from systemd's user bus.
- host-wasm + native sys stub: start the private bus only when nested
(WAYLAND_DISPLAY or DISPLAY set); under --drm apps use the session bus.
- moon-plasma-session: use $XDG_RUNTIME_DIR/bus when it exists, fall back to
re-running itself under dbus-run-session; push WAYLAND_DISPLAY and
XDG_* into the D-Bus/systemd activation environment so gcr-prompter can show
unlock prompts; run gnome-keyring-daemon --start --components=secrets.
- justfile run-drm(-native): update the activation environment too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hhWvZgm7r2v8NpS2g4
- New 'session' capability (wit/capabilities.wit) and 'logout' panel module: a button whose popup
asks 'Log out | Cancel' (Enter confirms, Escape cancels). Confirming makes the compositor exit,
which ends the login session; works in the wasm host and the native build. In the default panel.
- session/install.py --link (just install-session-dev): symlink the host, component, modules,
fonts and config into this checkout, so after one root install a rebuild is just
'just compositor-wasm host-wasm modules' for the next login. Plain installs still copy.
- Tests: host runtime test for the module, native end-to-end test (click, cancel, confirm).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
The whole compositor (Wayland server, window manager, scene, rasteriser, shell) now builds as
build/components/compositor.wasm: a component that imports only moonplasma:host/sys
(wit/host/sys.wit: sockets + SCM_RIGHTS, memfd, poll, spawn, files, clock) and exports run().
host-wasm/ is the native side: a wasmtime program implementing that interface with libc.
- compositor/sys: per-target backends (sys_native.mbt over the C shim, sys_wasm.mbt over the WIT
imports) behind one API; wayland/nested/host/shell/scene/renderer/gfx build for wasm unchanged.
- compositor/app: the entry point (arg parsing + main loop) as a library for both targets;
--serve keeps refreshing a PNG so a live compositor can be inspected without a display.
- compositor/font, compositor/wasm: wasm-side placeholders (bitmap font; no panel modules yet,
since a component can't embed a second wasm runtime: that becomes a host import).
- scripts/gen-native-stubs.py: native stand-ins for wasm-only generated imports.
- just compositor-wasm / host-wasm / run-wasm.
Verified: foot connects to the component's socket and renders into it; native build and
tests unchanged (16/23, the same 7 need unbuilt panel modules).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
scripts/tcc/tcc resolves the compiler (and errors with how to get one if none exists);
tcc-build stays as an optional recipe. bench no longer depends on it either.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
scripts/bench-build.sh copies the sources to a temp dir with its own target dir, so it
never touches _build/ or files being edited. just bench [runs] ["tcc cc cc-release"].
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
compositor/kms: libseat (device access, VT switching), DRM dumb buffers with page
flips and a hardware cursor, libinput keyboard/pointer, xkbcommon keymap and
modifiers. --drm runs the compositor on the real display at the monitor's native
mode. session/ holds the display-manager entry, launcher script and installer
(just install-session). Untested on hardware: refuses to start inside another
session.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
moon adds -DMOONBIT_NATIVE_NO_SYS_HEADER whenever the C compiler is tcc, which
compiles the system runtime out and breaks linking a standalone exe; the
scripts/tcc/tcc wrapper drops that flag. just tcc-build builds third_party/tinycc
into _build/tcc; build-release keeps the optimised system-cc build.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>