fix(cua-driver-rs): feature-gate portal+libei so bullseye CD publishes v0.6.1 - #1967
Conversation
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).
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe Linux ChangesLinux CI Dependency Expansion
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…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).
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.
Linux visual regression artifactsMatrix jobs now run independently. Download visual artifacts from this workflow run.
|
… 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>
Summary
PR #1966 (native-Wayland parity) made
pipewire-rs,libspa-sys, andreisrequired deps ofplatform-linux. That broke the cross-platform release CD's debian:11 container — bullseye ships PipeWire 0.3.19 (too old forlibspa-sys 0.8, which needslibpipewire-0.3 >= 0.3.40symbols likespa_type_param_latency) and has nolibei-devat all. The cua-driver-rs-v0.6.1 publish died onlinux-x86_64+linux-arm64build 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_screencastandwayland::libeimodules are currently dead code at the call-site level (only thelibei_inputCargo example references them), so the gate is a surgical change:pipewire,libspa,reis,calloop,enumflags2,xkbcommon→optional = trueashpd→default-features = false;screencast+remote_desktopmove under theportal-libeifeaturewayland/mod.rs→pub mod portal_screencast/pub mod libeibehind#[cfg(feature = "portal-libei")]cua-driverbinary crate → forwards the feature:portal-libei = ["platform-linux/portal-libei"]examples/libei_input.rs→required-features = ["portal-libei"]nix/cua-driver/package.nix→cargoBuildFlags/cargoTestFlagsadd--features portal-libei(nixpkgs supplies recent PipeWire + libei).github/workflows/cd-rust-cua-driver.yml→ reverts the speculativelibpipewire-0.3-devapt-install; bullseye stays minimalThe wlroots screencopy +
zwlr_virtual_pointer_v1paths and the X11 fallback work withoutportal-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 warningscargo check -p cua-driver --features portal-libei→ clean (feature is a no-op on macOS whereplatform-linuxisn't in the graph)Failed run that motivated this: https://github.com/trycua/cua/actions/runs/27962212948
Test plan
workflow_dispatchofcd-rust-cua-driver.ymlfrom this branch showslinux-x86_64+linux-arm64Build (release) steps pass withoutlibpipewire-0.3/libspa-sysin the dep graph.--features portal-libei(the existingNix Build & Integration Testsworkflow runs on merge).cd-rust-cua-driver.ymlagainst tagcua-driver-rs-v0.6.1to publish the release. Verify all 19 expected assets land on https://github.com/trycua/cua/releases/tag/cua-driver-rs-v0.6.1.cua-driver --versionon Debian 11, Ubuntu 22.04, Ubuntu 24.04 (GLIBC_2.31 floor preserved).