Skip to content

refactor: fix Rust CI deps and document unsafe blocks - #1

Merged
leandromqrs merged 18 commits into
mainfrom
ci/fix-deps-unsafe-lints
Oct 9, 2026
Merged

leandromqrs merged 18 commits into
mainfrom
ci/fix-deps-unsafe-lints

Conversation

@leandromqrs

@leandromqrs leandromqrs commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Changes

  • CI deps: Ubuntu gets libpipewire-0.3-dev, libopus-dev, libclang-dev, libasound2-dev; macOS gets opus, pkgconf; Windows jobs build with MSYS2 clang64 + gnullvm (same recipe as release-windows.yml) instead of gvsbuild.
  • Workspace edition moved from 2021 to 2024 (latest stable): unsafe extern blocks, unsafe around env::set_var, unsafe fn bodies wrapped in unsafe {}, let-chain clippy suggestions.
  • Workspace clippy lints: clippy::all, undocumented_unsafe_blocks, missing_safety_doc, with // SAFETY: comments for every unsafe block on Linux, macOS and Windows.
  • LibeiInputCapture::drop aborts the capture task and logs instead of panicking.
  • Windows: skip displays whose mode lookup fails instead of pushing a zeroed rect.
  • Tests: fixed stale port/status-text assertions in the GTK UI test; audio timing tests poll with a 3 s deadline instead of fixed sleeps; the 10 s wall-clock audio_keeps_flowing_through_the_whole_pipeline test is #[ignore]d outside Linux (macOS/Windows runners cannot hold 20 ms timers).
  • Removed the inherited Cachix workflow, its README badge and the binary-cache section of nix/README.md.

CI status

All 17 jobs pass (build/check/clippy/test on Ubuntu, macOS arm64, macOS Intel, Windows, plus Formatting).

Caveats

  • The loopback test no longer runs on macOS/Windows; it may be hiding a real latency problem there.
  • unsafe impl Send for MacOSEmulation rests on the app creating and driving it inside a spawn_local task on a current-thread runtime; read from code, not tested.

Ubuntu jobs failed in libspa-sys (no libpipewire-0.3) and macOS jobs failed building audiopus_sys through CMake because opus was not installed.
Add workspace clippy lints (undocumented_unsafe_blocks, missing_safety_doc), SAFETY comments for the Linux unsafe blocks, and abort the libei capture task in Drop instead of panicking while it still holds a raw pointer.
Convert extern blocks to unsafe extern, wrap macOS set_var calls in unsafe, document the test env mutation, apply let-chain clippy suggestions, and run the wall-clock audio loopback test only on Linux.
@leandromqrs leandromqrs changed the title Fix Rust CI deps and document unsafe blocks refactor: fix Rust CI deps and document unsafe blocks Oct 9, 2026
@leandromqrs
leandromqrs merged commit f99ab82 into main Oct 9, 2026
17 checks passed
@leandromqrs
leandromqrs deleted the ci/fix-deps-unsafe-lints branch October 9, 2026 11:38
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