Skip to content

Commit c36f84d

Browse files
zackeesclaude
andauthored
fix(viewer): apply NVIDIA and WebKitGTK workarounds before creating the webview (#226)
* fix(viewer): apply NVIDIA and WebKitGTK workarounds before creating the webview On Linux the Tauri viewer is WebKitGTK, and on NVIDIA hosts it failed in three ways: the Wayland window died at once with "Error 71 (Protocol error)", the X11 window painted solid grey, and the pthread WASM build could not bootstrap because JavaScriptCore hides SharedArrayBuffer. A new linux_graphics module runs in the internal viewer process before tauri::Builder, so the WebKit processes inherit the environment. It sets, only when the variable is unset: - JSC_useSharedArrayBuffer=1 always - __NV_DISABLE_EXPLICIT_SYNC=1 when the NVIDIA kernel driver is loaded, which keeps the fast DMA-BUF path working on Wayland (Tauri's documented fix) - WEBKIT_DISABLE_DMABUF_RENDERER=1 when NVIDIA and the X11 backend, where DMA-BUF import fails and only the shared-memory path paints The decision is a pure function with unit tests. Verified on NixOS with WebKitGTK 2.52.6, driver 595.71.05, KDE Wayland: with no manual environment the Wayland window now stays up and the X11 window renders the sketch. Refs the fastled-wasm Linux graphics guidance at https://v2.tauri.app/develop/debug/linux-graphics/ Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M9rUkvoW2gVKYurtQJpi4i * build: move zccache-fingerprint to 1.13.22 and the toolchain to Rust 1.95.0 The pinned zccache commit pulled in tikv-jemalloc-sys, whose configure step fails under the zccache C wrapper ("cannot determine return type of strerror_r"), so tests and clippy could not build on this host. The current zccache release no longer depends on jemalloc; it requires rustc 1.95.0, so rust-toolchain.toml moves from 1.94.1 to 1.95.0. Verified locally on 1.95.0: the linux_graphics unit tests, workspace clippy with -D warnings, the format check, and a release build. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M9rUkvoW2gVKYurtQJpi4i --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent d0029d2 commit c36f84d

6 files changed

Lines changed: 259 additions & 57 deletions

File tree

‎Cargo.lock‎

Lines changed: 94 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ tauri = { version = "2", features = ["devtools"] }
4040
tauri-build = { version = "2", features = [] }
4141
windows-sys = "0.61"
4242
# Parallel content-authoritative walker/hasher; remains compatible with Rust 1.85.
43-
zccache-fingerprint = { git = "https://github.com/zackees/zccache", rev = "1bd5b6387eff54695e37adbfacbb977079d6f174" }
43+
zccache-fingerprint = { git = "https://github.com/zackees/zccache", rev = "a7c84de53105ce41b2060bd9dd7730ef226e78a1" }
4444
shell-words = "1"
4545
globset = "0.4"
4646
tree-sitter = "0.26.9"

‎crates/fastled-cli/src/lib.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ pub mod frontend;
2020
pub mod install;
2121
mod install_unlock;
2222
mod keyboard;
23+
#[cfg(target_os = "linux")]
24+
pub mod linux_graphics;
2325
pub mod path;
2426
mod paths_util;
2527
pub mod project;

0 commit comments

Comments
 (0)