feat(servo-shell): add servo-shell skeleton, system UI, service unit, and Wayland input audit
Includes winit Wayland input audit for servo-shell integration planning.
New files:
- crates/weft-servo-shell/: new workspace member
- Cargo.toml: anyhow + tracing deps; no servo dep yet (requires git
dependency on github.com/servo/servo with multi-minute build; deferred
until embedder contract is confirmed)
- src/main.rs: reads WAYLAND_DISPLAY and WEFT_SYSTEM_UI_HTML, locates
system-ui.html from packaged path, calls embed_servo() stub that
returns a descriptive error explaining the integration work remaining
- infra/shell/system-ui.html: system UI document per blueprint Section 5
DOM structure (weft-desktop, weft-wallpaper, weft-taskbar, weft-launcher,
weft-notification-center, weft-window); includes clock and launcher toggle
- infra/systemd/servo-shell.service: Requires+After weft-compositor.service,
Type=simple, Restart=on-failure
- docs/architecture/winit-wayland-audit.md: audit of winit 0.30.x Wayland
backend against WEFT input requirements; identifies keyboard shortcut
inhibit gap, touch gesture gap, IME incomplete (zwp_text_input_v3),
frame pacing absent (wp_presentation_time), DMA-BUF unverified;
none block initial integration; all tracked as pre-GA work items
Modified:
- Cargo.toml: add weft-servo-shell to workspace members
- scripts/wsl-check.sh: switch to --workspace for all three gates
2026-03-10 23:34:26 +00:00
|
|
|
use std::path::PathBuf;
|
|
|
|
|
|
|
|
|
|
use anyhow::Context;
|
|
|
|
|
|
2026-03-11 13:52:13 +00:00
|
|
|
#[cfg(feature = "servo-embed")]
|
|
|
|
|
mod embedder;
|
2026-03-11 07:05:03 +00:00
|
|
|
mod protocols;
|
2026-03-11 13:59:58 +00:00
|
|
|
mod shell_client;
|
2026-03-11 07:05:03 +00:00
|
|
|
|
feat(servo-shell): add servo-shell skeleton, system UI, service unit, and Wayland input audit
Includes winit Wayland input audit for servo-shell integration planning.
New files:
- crates/weft-servo-shell/: new workspace member
- Cargo.toml: anyhow + tracing deps; no servo dep yet (requires git
dependency on github.com/servo/servo with multi-minute build; deferred
until embedder contract is confirmed)
- src/main.rs: reads WAYLAND_DISPLAY and WEFT_SYSTEM_UI_HTML, locates
system-ui.html from packaged path, calls embed_servo() stub that
returns a descriptive error explaining the integration work remaining
- infra/shell/system-ui.html: system UI document per blueprint Section 5
DOM structure (weft-desktop, weft-wallpaper, weft-taskbar, weft-launcher,
weft-notification-center, weft-window); includes clock and launcher toggle
- infra/systemd/servo-shell.service: Requires+After weft-compositor.service,
Type=simple, Restart=on-failure
- docs/architecture/winit-wayland-audit.md: audit of winit 0.30.x Wayland
backend against WEFT input requirements; identifies keyboard shortcut
inhibit gap, touch gesture gap, IME incomplete (zwp_text_input_v3),
frame pacing absent (wp_presentation_time), DMA-BUF unverified;
none block initial integration; all tracked as pre-GA work items
Modified:
- Cargo.toml: add weft-servo-shell to workspace members
- scripts/wsl-check.sh: switch to --workspace for all three gates
2026-03-10 23:34:26 +00:00
|
|
|
fn main() -> anyhow::Result<()> {
|
|
|
|
|
tracing_subscriber::fmt()
|
|
|
|
|
.with_env_filter(
|
|
|
|
|
tracing_subscriber::EnvFilter::try_from_default_env()
|
|
|
|
|
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")),
|
|
|
|
|
)
|
|
|
|
|
.init();
|
|
|
|
|
|
|
|
|
|
run()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn run() -> anyhow::Result<()> {
|
|
|
|
|
let wayland_display = std::env::var("WAYLAND_DISPLAY")
|
|
|
|
|
.context("WAYLAND_DISPLAY not set; weft-compositor must be running")?;
|
|
|
|
|
|
|
|
|
|
tracing::info!(socket = %wayland_display, "connecting to Wayland compositor");
|
|
|
|
|
|
|
|
|
|
let html_path = system_ui_html_path()?;
|
|
|
|
|
tracing::info!(path = %html_path.display(), "system UI entry point located");
|
|
|
|
|
|
2026-03-11 09:31:33 +00:00
|
|
|
let ws_port = appd_ws_port();
|
|
|
|
|
tracing::info!(ws_port, "appd WebSocket port");
|
|
|
|
|
|
2026-03-11 13:59:58 +00:00
|
|
|
let _shell = match shell_client::ShellClient::connect() {
|
|
|
|
|
Ok(c) => {
|
|
|
|
|
tracing::info!("shell window registered with compositor");
|
|
|
|
|
Some(c)
|
|
|
|
|
}
|
|
|
|
|
Err(e) => {
|
|
|
|
|
tracing::warn!(error = %e, "shell protocol unavailable; continuing without compositor registration");
|
|
|
|
|
None
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-11 09:31:33 +00:00
|
|
|
embed_servo(&wayland_display, &html_path, ws_port)
|
feat(servo-shell): add servo-shell skeleton, system UI, service unit, and Wayland input audit
Includes winit Wayland input audit for servo-shell integration planning.
New files:
- crates/weft-servo-shell/: new workspace member
- Cargo.toml: anyhow + tracing deps; no servo dep yet (requires git
dependency on github.com/servo/servo with multi-minute build; deferred
until embedder contract is confirmed)
- src/main.rs: reads WAYLAND_DISPLAY and WEFT_SYSTEM_UI_HTML, locates
system-ui.html from packaged path, calls embed_servo() stub that
returns a descriptive error explaining the integration work remaining
- infra/shell/system-ui.html: system UI document per blueprint Section 5
DOM structure (weft-desktop, weft-wallpaper, weft-taskbar, weft-launcher,
weft-notification-center, weft-window); includes clock and launcher toggle
- infra/systemd/servo-shell.service: Requires+After weft-compositor.service,
Type=simple, Restart=on-failure
- docs/architecture/winit-wayland-audit.md: audit of winit 0.30.x Wayland
backend against WEFT input requirements; identifies keyboard shortcut
inhibit gap, touch gesture gap, IME incomplete (zwp_text_input_v3),
frame pacing absent (wp_presentation_time), DMA-BUF unverified;
none block initial integration; all tracked as pre-GA work items
Modified:
- Cargo.toml: add weft-servo-shell to workspace members
- scripts/wsl-check.sh: switch to --workspace for all three gates
2026-03-10 23:34:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn system_ui_html_path() -> anyhow::Result<PathBuf> {
|
|
|
|
|
if let Ok(p) = std::env::var("WEFT_SYSTEM_UI_HTML") {
|
|
|
|
|
return Ok(PathBuf::from(p));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let packaged = PathBuf::from("/packages/system/servo-shell/active/share/weft/system-ui.html");
|
|
|
|
|
if packaged.exists() {
|
|
|
|
|
return Ok(packaged);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
anyhow::bail!(
|
|
|
|
|
"system-ui.html not found; set WEFT_SYSTEM_UI_HTML or install the servo-shell package"
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-11 09:31:33 +00:00
|
|
|
fn appd_ws_port() -> u16 {
|
|
|
|
|
if let Ok(explicit) = std::env::var("WEFT_APPD_WS_PORT")
|
|
|
|
|
&& let Ok(n) = explicit.trim().parse::<u16>()
|
|
|
|
|
{
|
|
|
|
|
return n;
|
|
|
|
|
}
|
|
|
|
|
if let Ok(runtime_dir) = std::env::var("XDG_RUNTIME_DIR") {
|
|
|
|
|
let port_file = std::path::Path::new(&runtime_dir)
|
|
|
|
|
.join("weft")
|
|
|
|
|
.join("appd.wsport");
|
|
|
|
|
if let Ok(contents) = std::fs::read_to_string(&port_file)
|
|
|
|
|
&& let Ok(n) = contents.trim().parse::<u16>()
|
|
|
|
|
{
|
|
|
|
|
return n;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
7410
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn embed_servo(
|
|
|
|
|
_wayland_display: &str,
|
2026-03-11 13:52:13 +00:00
|
|
|
html_path: &std::path::Path,
|
|
|
|
|
ws_port: u16,
|
2026-03-11 09:31:33 +00:00
|
|
|
) -> anyhow::Result<()> {
|
2026-03-11 13:52:13 +00:00
|
|
|
#[cfg(feature = "servo-embed")]
|
|
|
|
|
return embedder::run(html_path, ws_port);
|
|
|
|
|
|
|
|
|
|
#[cfg(not(feature = "servo-embed"))]
|
|
|
|
|
{
|
|
|
|
|
tracing::warn!(
|
|
|
|
|
path = %html_path.display(),
|
|
|
|
|
ws_port,
|
|
|
|
|
"servo-embed feature not enabled; build with --features servo-embed to activate"
|
|
|
|
|
);
|
|
|
|
|
anyhow::bail!("servo-embed feature required")
|
|
|
|
|
}
|
feat(servo-shell): add servo-shell skeleton, system UI, service unit, and Wayland input audit
Includes winit Wayland input audit for servo-shell integration planning.
New files:
- crates/weft-servo-shell/: new workspace member
- Cargo.toml: anyhow + tracing deps; no servo dep yet (requires git
dependency on github.com/servo/servo with multi-minute build; deferred
until embedder contract is confirmed)
- src/main.rs: reads WAYLAND_DISPLAY and WEFT_SYSTEM_UI_HTML, locates
system-ui.html from packaged path, calls embed_servo() stub that
returns a descriptive error explaining the integration work remaining
- infra/shell/system-ui.html: system UI document per blueprint Section 5
DOM structure (weft-desktop, weft-wallpaper, weft-taskbar, weft-launcher,
weft-notification-center, weft-window); includes clock and launcher toggle
- infra/systemd/servo-shell.service: Requires+After weft-compositor.service,
Type=simple, Restart=on-failure
- docs/architecture/winit-wayland-audit.md: audit of winit 0.30.x Wayland
backend against WEFT input requirements; identifies keyboard shortcut
inhibit gap, touch gesture gap, IME incomplete (zwp_text_input_v3),
frame pacing absent (wp_presentation_time), DMA-BUF unverified;
none block initial integration; all tracked as pre-GA work items
Modified:
- Cargo.toml: add weft-servo-shell to workspace members
- scripts/wsl-check.sh: switch to --workspace for all three gates
2026-03-10 23:34:26 +00:00
|
|
|
}
|