guanghu/docs/adr/0141-scoped-linux-webkit-rendering-safeguards.md
冰朔 8739805f99
Some checks failed
Auto-update PR branches / Update open PR branches (push) Has been cancelled
CI / Frontend Static Quality Checks (push) Has been cancelled
CI / Frontend Tests & Coverage (push) Has been cancelled
CI / Rust Tests & Quality Checks (push) Has been cancelled
CI / Linux build verification (push) Has been cancelled
Release (Alpha) / Compute alpha version (push) Has been cancelled
Release (Alpha) / Build release artifacts (push) Has been cancelled
Release (Alpha) / GitHub Release (alpha) (push) Has been cancelled
Release (Alpha) / Update docs and release pages (push) Has been cancelled
Deploy docs / Build VitePress site (push) Has been cancelled
Deploy docs / Deploy to GitHub Pages (push) Has been cancelled
光湖开源源码快照 · Tolaria AGPL 分叉基线 · 独立更新链
2026-07-05 17:45:16 +08:00

2.7 KiB

type, id, title, status, date
type id title status date
ADR 0141 Scoped Linux WebKit rendering safeguards active 2026-06-18

Context

Tolaria needs Linux WebKitGTK startup safeguards because some Wayland/AppImage environments crash before the app can render. The existing startup path treated native Linux Wayland launches and sealed Linux AppImage launches the same way by setting both WEBKIT_DISABLE_DMABUF_RENDERER=1 and WEBKIT_DISABLE_COMPOSITING_MODE=1 unless the user had already provided either variable.

That broad fallback protected unstable AppImage launches, but it also applied the last-resort compositing disablement to native Wayland sessions. Native Wayland still needs the DMABUF crash workaround, but disabling WebKit compositing there can make windows feel unresponsive. The sealed AppImage runtime remains the verified environment that needs both rendering overrides.

Decision

Tolaria scopes Linux WebKit rendering safeguards by launch environment:

  • Native Linux Wayland launches set WEBKIT_DISABLE_DMABUF_RENDERER=1 by default, while preserving WebKit compositing unless the user explicitly disables it.
  • Linux AppImage launches continue to set both WEBKIT_DISABLE_DMABUF_RENDERER=1 and WEBKIT_DISABLE_COMPOSITING_MODE=1 by default because the sealed AppImage path has the verified rendering failure this fallback protects.
  • User-provided environment values remain authoritative per variable, so advanced users and distro-specific workarounds can override either safeguard.

Alternatives considered

  • Scope the fallback by launch environment (chosen): keeps the proven AppImage protection while avoiding a heavier native Wayland workaround that hurts responsiveness. Cons: the startup policy now distinguishes AppImage from native Linux sessions.
  • Keep both overrides for all Wayland and AppImage launches: simplest and maximally conservative for crash avoidance, but applies the last-resort compositing workaround beyond the environment that actually needs it.
  • Remove the WebKit rendering overrides entirely: restores default WebKitGTK behavior, but would reopen known Linux startup crashes in AppImage/Wayland environments.

Consequences

Native Linux Wayland users keep the broad DMABUF crash workaround without losing WebKit compositing by default. AppImage users keep the sealed-runtime fallback that has been validated against the startup crash class.

Future Linux rendering work should treat linux_appimage.rs startup overrides as a capability/policy boundary, not as a single global Linux switch. Re-evaluate this decision if WebKitGTK or the AppImage runtime no longer requires these environment safeguards, or if another packaged Linux runtime develops a distinct rendering failure mode.