Files
chandra/interface/moonplasma/host/sys/pkg.generated.mbti
T
nandiandClaude Sonnet 5.5 6aba9b6a4f
CI / test (push) Failing after 22s
Compile the compositor to a wasm component, run by a small wasmtime host
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>
2026-11-25 01:41:31 -08:00

61 lines
1.1 KiB
Plaintext

// Generated using `moon info`, DON'T EDIT IT
package "moonplasma/desktop/interface/moonplasma/host/sys"
// Values
pub fn close_fd(Int32) -> Unit
pub fn getenv(String) -> String
pub fn getpid() -> Int32
pub fn has_exe(String) -> Bool
pub fn list_desktop_files(String) -> Array[String]
pub fn memfd_create(String, Int32) -> Int32
pub fn mkdir_p(String) -> Bool
pub fn mmap_read(Int32, Int32) -> FixedArray[Byte]
pub fn poll_read(Int32, Int32) -> Int32
pub fn pwrite(Int32, FixedArray[Byte], Int32) -> Int32
pub fn read_file(String) -> FixedArray[Byte]
pub fn read_proc(String) -> FixedArray[Byte]
pub fn recvmsg(Int32, UInt32) -> Received
pub fn sendmsg(Int32, FixedArray[Byte], Int32) -> Int32
pub fn sleep_ms(Int32) -> Unit
pub fn spawn(String, String) -> Bool
pub fn unix_accept(Int32) -> Int32
pub fn unix_connect(String) -> Int32
pub fn unix_listen(String) -> Int32
pub fn unlink(String) -> Unit
pub fn wall_time_field(Int32) -> Int32
pub fn write_file(String, FixedArray[Byte]) -> Int32
// Errors
// Types and methods
pub(all) struct Received {
count : Int32
fd : Int32
data : FixedArray[Byte]
}
// Type aliases
// Traits