Skip to content

fix(cua-driver-rs): feature-gate portal+libei so bullseye CD publishes v0.6.1 - #1967

Merged
f-trycua merged 3 commits into
mainfrom
fix/cd-rust-cua-driver-pipewire-deps
Jun 22, 2026
Merged

fix(cua-driver-rs): feature-gate portal+libei so bullseye CD publishes v0.6.1#1967
f-trycua merged 3 commits into
mainfrom
fix/cd-rust-cua-driver-pipewire-deps

Conversation

@f-trycua

@f-trycua f-trycua commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

PR #1966 (native-Wayland parity) made pipewire-rs, libspa-sys, and reis required deps of platform-linux. That broke the cross-platform release CD's debian:11 container — bullseye ships PipeWire 0.3.19 (too old for libspa-sys 0.8, which needs libpipewire-0.3 >= 0.3.40 symbols like spa_type_param_latency) and has no libei-dev at all. The cua-driver-rs-v0.6.1 publish died on linux-x86_64 + linux-arm64 build before any tarball was produced — latest published release on GitHub is still v0.6.0.

Bumping the container to bookworm was the obvious-but-bad fix: it raises glibc 2.31 → 2.36 and breaks the cua-driver binary on Ubuntu 22.04, RHEL/Rocky 9, and Debian 11. The whole binary, not just Wayland features.

This PR feature-gates the portal+libei wiring instead. The wayland::portal_screencast and wayland::libei modules are currently dead code at the call-site level (only the libei_input Cargo example references them), so the gate is a surgical change:

  • pipewire, libspa, reis, calloop, enumflags2, xkbcommonoptional = true
  • ashpddefault-features = false; screencast + remote_desktop move under the portal-libei feature
  • wayland/mod.rspub mod portal_screencast / pub mod libei behind #[cfg(feature = "portal-libei")]
  • cua-driver binary crate → forwards the feature: portal-libei = ["platform-linux/portal-libei"]
  • examples/libei_input.rsrequired-features = ["portal-libei"]
  • nix/cua-driver/package.nixcargoBuildFlags/cargoTestFlags add --features portal-libei (nixpkgs supplies recent PipeWire + libei)
  • .github/workflows/cd-rust-cua-driver.yml → reverts the speculative libpipewire-0.3-dev apt-install; bullseye stays minimal

The wlroots screencopy + zwlr_virtual_pointer_v1 paths and the X11 fallback work without portal-libei — only the GNOME/KDE portal-specific tiers (which were unreached by the dispatch anyway) go dark in the cross-platform tarballs. The Nix build keeps the full stack.

Local verification on macOS:

  • cargo check -p cua-driver → clean, no manifest warnings
  • cargo check -p cua-driver --features portal-libei → clean (feature is a no-op on macOS where platform-linux isn't in the graph)

Failed run that motivated this: https://github.com/trycua/cua/actions/runs/27962212948

Test plan

  • Validation workflow_dispatch of cd-rust-cua-driver.yml from this branch shows linux-x86_64 + linux-arm64 Build (release) steps pass without libpipewire-0.3 / libspa-sys in the dep graph.
  • Nix build still produces a working binary with --features portal-libei (the existing Nix Build & Integration Tests workflow runs on merge).
  • After merge: re-dispatch cd-rust-cua-driver.yml against tag cua-driver-rs-v0.6.1 to publish the release. Verify all 19 expected assets land on https://github.com/trycua/cua/releases/tag/cua-driver-rs-v0.6.1.
  • Downloaded Linux tarball runs cua-driver --version on Debian 11, Ubuntu 22.04, Ubuntu 24.04 (GLIBC_2.31 floor preserved).

The native-Wayland parity merge (PR #1966) added libspa-sys (via
pipewire-rs) and the rust-bindgen-generated SPA pod bindings to
cua-driver's Linux build. The cross-platform CD's debian:11 container
apt-installed only the X11/Wayland C deps, so v0.6.1's linux-x86_64
and linux-arm64 builds failed at libspa-sys' build.rs with:

  No package 'libpipewire-0.3' found

Add libpipewire-0.3-dev + libspa-0.2-dev (both shipped in bullseye)
and clang + libclang-dev (for the bindgen pass) so the published
Linux tarballs link the portal ScreenCast path.

libei-dev is deliberately not added: it's only in trixie, and reis is
pure-Rust at build time (the libei runtime client is loaded via the
portal RemoteDesktop file descriptor).
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Jun 22, 2026 3:43pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: df32eab9-630b-49ff-b434-08ef28f53405

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The Linux build-linux job's "Install base tooling" step in the CD workflow gains four new Debian bullseye packages: libpipewire-0.3-dev, libspa-0.2-dev, clang, and libclang-dev. Inline comments are added to document each dependency's purpose, including a note that libei-dev is intentionally omitted.

Changes

Linux CI Dependency Expansion

Layer / File(s) Summary
Linux container apt-get dependency additions
.github/workflows/cd-rust-cua-driver.yml
Adds PipeWire (libpipewire-0.3-dev), SPA (libspa-0.2-dev), and bindgen/clang support (clang, libclang-dev) to the apt-get install list, with inline comments explaining each package's role and noting that libei-dev is intentionally excluded.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • trycua/cua#1919: Also modifies the Linux build-linux job's apt-get dependency set in the same workflow file, establishing the Debian 11 container and base packages that this PR now extends.

Poem

🐇 Hop hop, the build needs more things to compile,
PipeWire and SPA added to the pile,
Clang and bindgen now join the queue,
A rabbit checked the deps — all shiny and new!
With comments to explain each library's role,
The Linux container is finally whole! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: fixing a CD pipeline issue by feature-gating portal and libei dependencies so the bullseye build can publish v0.6.1.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cd-rust-cua-driver-pipewire-deps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…ompiles

The PipeWire ScreenCast + libei RemoteDesktop wiring landed by PR #1966
made libspa-sys and reis required deps of platform-linux, which broke
the cross-platform release CD (debian:11 container, GLIBC_2.31 floor):

  * libpipewire-0.3 is in bullseye but at 0.3.19 — too old for
    libspa-sys 0.8 (needs >= 0.3.40 for spa_type_param_latency etc.)
  * libei-dev doesn't exist in bullseye at all (added in trixie)

Bumping the container to bookworm would have raised glibc to 2.36 and
broken every cua-driver binary on Ubuntu 22.04 / RHEL 9 — a regression
that hits the X11 path users too, not just Wayland.

The portal_screencast and libei modules are currently dead code at the
call-site level (only the libei_input Cargo example references them),
so the gate is a small surgical change:

  * pipewire, libspa, reis, calloop, enumflags2, xkbcommon: optional
  * ashpd: default-features = false; screencast + remote_desktop only
    when portal-libei is on
  * wayland/mod.rs: pub mod portal_screencast / libei behind cfg
  * cua-driver (binary crate): forward portal-libei feature
  * libei_input example: required-features = portal-libei
  * Nix build: cargoBuildFlags/cargoTestFlags add --features portal-libei
  * Cross-platform CD: revert the libpipewire-0.3-dev apt-install
    addition (not needed anymore)

cargo check -p cua-driver on macOS with and without --features
portal-libei both succeed (no manifest warnings).
@f-trycua f-trycua changed the title ci(cd-rust-cua-driver): install libpipewire + clang in Linux container fix(cua-driver-rs): feature-gate portal+libei so bullseye CD publishes v0.6.1 Jun 22, 2026
Standalone Cargo example that drives the libei input path
(`wayland::libei::move_absolute`, `click`, `type_text`) and prints
timing per call. Useful for verifying the portal RemoteDesktop + EIS
handshake on a real GNOME / KDE-Wayland host. Gated behind the
`portal-libei` feature in platform-linux/Cargo.toml so a stock
`cargo build --examples` on the cross-platform CD does not try to
compile against the (now-optional) reis dependency.

The example was left out of #1966 by oversight (only screenshot_cascade
made it in); committing it now so the [[example]] block in this PR
references a real file and `cargo build --examples --features
portal-libei` works.
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Linux visual regression artifacts

Matrix jobs now run independently. Download visual artifacts from this workflow run.
Each background-GUI job uploads a .gif of the interaction plus two annotated PNGs (<app>.png raw, <app>-atspi.png with AT-SPI element boxes); the cua-driver-linux-som-overlays artifact adds <app>-som.png cua Set-of-Marks overlays:

  • cua-driver-linux-cursor-click-gif
  • cua-driver-linux-background-terminal-gif
  • cua-driver-linux-parallel-drag-xserver
  • cua-driver-linux-background-gui-chromium
  • cua-driver-linux-background-gui-tk
  • cua-driver-linux-background-gui-gtk3-gedit
  • cua-driver-linux-background-gui-gtk3-mousepad
  • cua-driver-linux-background-gui-gtk3-scite
  • cua-driver-linux-background-gui-gtk4-characters
  • cua-driver-linux-background-gui-qt5-manuskript
  • cua-driver-linux-background-gui-qt5-klog
  • cua-driver-linux-background-gui-qt5-openambit
  • cua-driver-linux-background-gui-qt6-kate
  • cua-driver-linux-background-gui-qt6-kcalc
  • cua-driver-linux-background-gui-qt6-okular
  • cua-driver-linux-background-gui-qt6-qownnotes
  • cua-driver-linux-background-gui-electron-zettlr
  • cua-driver-linux-background-gui-electron-joplin
  • cua-driver-linux-background-gui-electron-logseq
  • cua-driver-linux-som-overlays

Open workflow run and download artifacts

@f-trycua
f-trycua merged commit 5061c11 into main Jun 22, 2026
72 of 75 checks passed
@f-trycua
f-trycua deleted the fix/cd-rust-cua-driver-pipewire-deps branch June 22, 2026 15:48
f-trycua added a commit that referenced this pull request Jun 24, 2026
… instead of silent no-op (#1982) (#1992)

On non-wlroots compositors (KWin/Plasma, Mutter/GNOME) there is no
zwlr_virtual_pointer; the only working input path is libei via
xdg-desktop-portal, which is feature-gated behind `portal-libei` and compiled
OUT of the published tarball (#1967). Result: the agent cursor renders, but
clicks/keys are never delivered, and `doctor` reported a misleading partial
pass ('input may fall back where virtual-pointer is absent').

- Add wayland::PORTAL_LIBEI_ENABLED (= cfg!(feature = "portal-libei")).
- doctor wayland_backend: when virtual-pointer is absent AND this build has no
  libei/portal support, FAIL with an actionable message (use the portal build
  or a wlroots compositor) instead of a false partial-pass.
- open_vptr_session: same actionable error at input time so the no-op failure
  surfaces to the caller instead of looking like a silent success.

Addresses the issue author's recommended near-term fix (option #2): end the
silent failure mode. The two-variant publish (option #1) remains separate work.


Claude-Session: https://claude.ai/code/session_01KMXCW4M5uK1HRGjjH4wueZ

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant