- Replace Mesa-libEGL-devel and Mesa-libGLES-devel (do not exist on openSUSE) with libglvnd-devel (Khronos EGL/GLES dispatch headers) - Replace libseat-devel (does not exist on openSUSE) with seatd-devel Package names confirmed via rpmfind.net against Tumbleweed and Leap repositories.
6.8 KiB
Servo Pin
Current pin
| Field | Value |
|---|---|
| Source | https://github.com/marcoallegretti/servo (fork of servo/servo) |
| Branch | servo-weft |
| Rev | 04ca254f843ed650d3e5b14e5693ad51a60cc84b (servo-weft tip, 2026-03-11) |
| Crate | servo (package name as of 2026-03-11; previously libservo) |
| Feature | servo-embed (optional; off by default) |
Cargo dependencies
The Servo deps are wired in crates/weft-servo-shell/Cargo.toml and
crates/weft-app-shell/Cargo.toml under the servo-embed optional feature.
They are off by default to avoid pulling the Servo monorepo (~1 GB) into every
cargo check cycle.
Current Cargo.toml block (already committed):
[features]
servo-embed = ["dep:servo", "dep:winit", "dep:softbuffer"]
[dependencies.servo]
git = "https://github.com/marcoallegretti/servo"
branch = "servo-weft"
optional = true
default-features = false
[dependencies.winit]
version = "0.30"
optional = true
features = ["wayland"]
[dependencies.softbuffer]
version = "0.4"
optional = true
To build:
cargo build -p weft-servo-shell --features servo-embed
The first build downloads and compiles Servo and its dependencies, which takes 30–60 minutes cold. Subsequent incremental builds are faster.
System dependencies
The following system packages are required when servo-embed is enabled:
libglvnd-devellibopenssl-develdbus-1-devellibudev-devellibxkbcommon-devellibwayland-devel
Install with: sudo zypper install -y libglvnd-devel libopenssl-devel dbus-1-devel libudev-devel libxkbcommon-devel libwayland-devel
Rendering approach
Default: SoftwareRenderingContext (CPU rasterisation) blitted to a
softbuffer-backed winit window.
EGL path: set WEFT_EGL_RENDERING=1 at runtime. The embedder attempts
WindowRenderingContext::new using the winit display and window handles.
If construction fails it falls back to software automatically.
When the EGL path is active Servo presents directly to the EGL surface via
surfman's eglSwapBuffers; the softbuffer blit is skipped. Mesa handles
DMA-BUF buffer sharing with the compositor transparently.
Known limitations at this pin
- Wayland input events:
not forwarded to ServoResolved — keyboard and mouse events forwarded viawebview.notify_input_event; key mapping inkeyutils.rs. - Wayland surface sharing:
Resolved —ZweftShellWindowV1created withsurface = nullShellClient::connect_with_display(display_ptr, surface_ptr)usesBackend::from_foreign_displayto share winit'swl_displayconnection; the winitwl_surfacepointer is passed directly tocreate_window, associating the compositor shell slot with the actual rendered surface.ShellClientis now constructed insideresumed()after the winit window exists, not before the event loop. EGL path and per-frame event dispatch are unchanged. Protocol note:wayland-scanner 0.31generates_type(notr#type) for thenavigation_gestureevent arg namedtype. - WebGPU on Mesa: adapter may fail CTS — validation task, requires Mesa GPU hardware.
- CSS layout features:
CSS GridGrid resolved (Taffy-backed, fully wired).CSSbackdrop-filterunimplementedbackdrop-filterresolved (servo/servo issue #41567). Implemented across two commits:marcoallegretti/styloservo-weftf1ba496: removedservo_pref = "layout.unimplemented"frombackdrop-filterinstyle/properties/longhands.toml(enables parsing).marcoallegretti/servoservo-weft8e7dc40:Cargo.tomlpatched to use the stylo fork;style_ext.rsaddsbackdrop-filtertoestablishes_stacking_contextandestablishes_containing_block_for_all_descendants;stacking_context.rsguards the WebRender stacking-context early-return onbackdrop_filter.0.is_empty();display_list/mod.rsaddsBuilderForBoxFragment::build_backdrop_filtercallingpush_backdrop_filterbefore background paint.
- Per-app process isolation:
not implementedResolved — each app runs in a separateweft-app-shellandweft-runtimeOS process pair supervised byweft-appd. OS-level isolation does not require Servo's multi-process constellation architecture. - SpiderMonkey sandbox: SpiderMonkey is not sandbox-isolated beyond process-level isolation.
JIT-compiled JS runs with the same memory permissions as the Servo process. WEFT relies on
SpiderMonkey's own security properties for the JavaScript execution boundary. See
docs/security.mdfor the full bounded statement. Not addressed.
Update policy
The servo-weft branch is the working branch for WEFT-specific Servo patches.
Upstream servo/servo changes are merged into it periodically.
To rebase onto a new upstream commit:
- In the
marcoallegretti/servorepo:git fetch upstream && git rebase upstream/mainonservo-weft. - Force-push
servo-weft. - Update
Revin this file to the new tip SHA. - Run
cargo update -p servoin the WEFT OS workspace. - Confirm the compositor and shell tests still pass.
To submit patches upstream: open a PR from servo-weft (or a topic branch) to servo/servo.
Stylo fork
The Stylo CSS engine is a separate repo (servo/stylo) pinned at rev dca3934667dae76c49bb579b268c5eb142d09c6a
in Cargo.toml. To patch it for WEFT-specific changes (e.g. enabling backdrop-filter):
- Fork
servo/stylotomarcoallegretti/stylo, create branchservo-weft. - Make changes on that branch.
- Add to this fork's
Cargo.tomlworkspace[patch]section:
[patch."https://github.com/servo/stylo"]
stylo = { git = "https://github.com/marcoallegretti/stylo", branch = "servo-weft" }
stylo_atoms = { git = "https://github.com/marcoallegretti/stylo", branch = "servo-weft" }
stylo_dom = { git = "https://github.com/marcoallegretti/stylo", branch = "servo-weft" }
stylo_malloc_size_of = { git = "https://github.com/marcoallegretti/stylo", branch = "servo-weft" }
stylo_static_prefs = { git = "https://github.com/marcoallegretti/stylo", branch = "servo-weft" }
stylo_traits = { git = "https://github.com/marcoallegretti/stylo", branch = "servo-weft" }
selectors = { git = "https://github.com/marcoallegretti/stylo", branch = "servo-weft" }
servo_arc = { git = "https://github.com/marcoallegretti/stylo", branch = "servo-weft" }
- Run
cargo updateto resolve the new stylo deps. - Commit both the
Cargo.tomlandCargo.lockchanges toservo-weft.