Skip to content

fix(cua-driver): pass CUA_DRIVER_RS_ENABLE_WAYLAND through to embedded hosts - #4877

Merged
f-trycua merged 1 commit into
mainfrom
fix/cua-driver-embedded-wayland-env
Oct 8, 2026
Merged

f-trycua merged 1 commit into
mainfrom
fix/cua-driver-embedded-wayland-env

Conversation

@f-trycua

@f-trycua f-trycua commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

What

EmbeddedCuaDriverHost builds the daemon's environment from an allowlist (allowed_environment_name in cua-driver-sdk/src/embedded.rs). CUA_DRIVER_RS_ENABLE_WAYLAND was missing from it, so on Linux an embedding host could not turn on the native Wayland backend. Neither the host's own environment nor an explicit environment entry got through, and nothing reported the drop.

This adds the name to the allowlist. A new test covers:

  • inheritance from the host process;
  • an explicit host opt-in;
  • an explicit 0 overriding an inherited 1;
  • LD_PRELOAD and the approval bypass staying blocked.

Credit

Ported from T3 Code's Linux patch to Cua Driver 0.34.0: pingdotgg/t3code#16975, patches/cua-driver-linux/0.34.0.patch. T3 Code is MIT-licensed, Copyright (c) 2026 T3 Tools Inc. This PR adds a T3 Code row to libs/cua-driver/rust/THIRD_PARTY_NOTICES.md. This is the first of a short series that upstreams that patch, so T3 Code can drop its Linux fork.

Testing

  • cargo test -p cua-driver-sdk --lib embedded::tests: 13 passed locally, including the new wayland_backend_opt_in_reaches_embedded_driver.
  • Linux CI (CI: Rust Linux unit) runs on this PR.

Linear: CUA-1234 (tracking CUA-1233)

🤖 Generated with Claude Code

…d hosts

The embedded host builds the daemon environment from an allowlist, and
CUA_DRIVER_RS_ENABLE_WAYLAND was not on it. A host such as an Electron
app could never turn on the native Wayland backend: the opt-in was
dropped silently. Allow it, and test inheritance, an explicit host
opt-in, and an explicit opt-out winning over an inherited opt-in.

Ported from T3 Code's Linux patch to Cua Driver 0.34.0
(pingdotgg/t3code#16975, MIT, Copyright (c) 2026 T3 Tools Inc.);
credited in THIRD_PARTY_NOTICES.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant