mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-26 17:03:09 +00:00
WEFT OS is a Wayland compositor and application runtime where every app is a WebAssembly component rendered in an isolated Servo WebView.
runtime.rs — process lifecycle manager: - supervise(session_id, app_id, registry): spawns the weft-runtime child process identified by WEFT_RUNTIME_BIN env var. If unset, logs debug and returns immediately (no-op until runtime binary is available). - Child process invoked as: <WEFT_RUNTIME_BIN> <app_id> <session_id> with stdout/stderr piped, stdin closed. - wait_for_ready(): reads stdout line-by-line; returns Ok(()) on first line matching 'READY'; returns Err if stdout closes without it. - 30-second READY_TIMEOUT via tokio::time::timeout; on expiry, kills the child and transitions session to Stopped. - On success: sets session state to Running, broadcasts AppReady to all connected WebSocket clients via registry broadcast channel. - drain_stderr(): async task that forwards child stderr lines to tracing at WARN level for observability. - On process exit: sets session state to Stopped regardless of exit code. main.rs — wiring: - SessionRegistry now owns broadcast::Sender<Response>; Default creates the channel internally. Added set_state(), subscribe(), broadcast() methods. Removed standalone broadcast_tx from run(); WS handlers subscribe via registry.lock().await.subscribe(). - dispatch::LaunchApp spawns a tokio task calling runtime::supervise immediately after creating the session. supervise is a no-op when WEFT_RUNTIME_BIN is unset, so existing tests are unaffected. Cargo.toml: added tokio 'process' and 'time' features. |
||
|---|---|---|
| .github/workflows | ||
| crates | ||
| docs | ||
| infra | ||
| protocol | ||
| scripts | ||
| .gitattributes | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| justfile | ||
| README.md | ||
| rust-toolchain.toml | ||
WEFT OS
WEFT OS is a Linux-based operating system effort built around a Smithay compositor, a Servo-rendered system shell, and a Wasmtime-based application runtime.
Current repository scope
This repository currently contains:
- the baseline Rust workspace
- public engineering documentation derived from the authoritative blueprint
- initial design documents for the shell protocol boundary and the Wasm–Servo channel
- local and CI validation paths for repository bootstrap work
It does not yet contain a compositor, shell, or application runtime implementation.
Source of truth
The authoritative technical reference for this repository is docu_dev/WEFT-OS-COMPREHENSIVE-BLUEPRINT.md.
Historical blueprint documents exist in docu_dev/, but they are not implementation authority where they conflict with the comprehensive blueprint.
Privacy boundary
docu_dev/ is a private coordination area used during development. It is intentionally ignored by git and is not part of the tracked public repository surface.
Development model
- Primary development host: Windows workstation
- Primary runtime target: Linux VM or QEMU guest
- Core system language: Rust
Validation
On Windows PowerShell:
./infra/scripts/check.ps1
On Linux:
./infra/scripts/check.sh
Repository layout
crates/ Rust workspace members
docs/ Public engineering documentation
infra/ Validation scripts and VM workflow material