diff --git a/Cargo.toml b/Cargo.toml index 68dfa8f..210454e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,10 +2,12 @@ name = "wl-webrtc" version = "0.1.0" edition = "2021" -# Matches README's "Rust toolchain (1.70+)". Pinning rust-version prevents -# building on toolchains older than we've actually tested, and gives cargo -# a useful error message instead of a parse/error cascade. -rust-version = "1.70" +# MSRV pinned to 1.87 to match the actual API floor — the codebase uses +# u32::is_multiple_of (1.87) and Option::is_none_or (1.82) introduced by +# clippy autofixes. README's Prerequisites section mirrors this. Bumping +# this floor requires checking clippy::incompatible_msrv against the new +# value. +rust-version = "1.87" description = "Wayland screen capture and encoding tool" [dependencies] diff --git a/README.md b/README.md index ad7ff81..91d87d1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Wayland screen capture and encoding tool. ## Prerequisites -- **Rust toolchain** (1.70+): `rustup default stable` +- **Rust toolchain** (1.87+; MSRV pinned to match `u32::is_multiple_of` / `Option::is_none_or` usage): `rustup default stable` - **FFmpeg 6.0+** dev libraries with VAAPI support: - Arch: `pacman -S ffmpeg` - Ubuntu/Debian: `apt install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libva-dev` diff --git a/src/state_portal.rs b/src/state_portal.rs index a2678b5..9c6f1ec 100644 --- a/src/state_portal.rs +++ b/src/state_portal.rs @@ -1,4 +1,7 @@ // 采集门户状态模块 —— 通过 PipeWire/DMA-BUF 进行屏幕采集并编码 +// AsRawFd is required by frame.fd.as_raw_fd() in build_drm_descriptor below +// but rustc emits a false "unused_imports" warning because OwnedFd also has +// an inherent as_raw_fd — same quirk as avhw.rs. E0599 if removed → keep it. use std::os::fd::AsRawFd; use std::path::PathBuf; use std::sync::atomic::{AtomicBool, Ordering}; diff --git a/src/transform.rs b/src/transform.rs index c800715..afd3774 100644 --- a/src/transform.rs +++ b/src/transform.rs @@ -1,11 +1,11 @@ -/// Coordinate transformation module for Wayland output transforms. -// -// Historically exposed a family of `Rect`/`screen_to_frame`/`fit_inside_bounds` -// helpers for ROI-based capture clipping. Those were never wired into the -// capture pipeline (we capture full frames and let FFmpeg's filter graph handle -// any scaling/rotation); they have been removed. Only `Transform` and the -// `transpose_if_transform_transposed` helper remain — both are actively used by -// `state.rs` and `avhw.rs`. +//! Coordinate transformation module for Wayland output transforms. +//! +//! Historically exposed a family of `Rect`/`screen_to_frame`/`fit_inside_bounds` +//! helpers for ROI-based capture clipping. Those were never wired into the +//! capture pipeline (we capture full frames and let FFmpeg's filter graph handle +//! any scaling/rotation); they have been removed. Only `Transform` and the +//! `transpose_if_transform_transposed` helper remain — both are actively used by +//! `state.rs` and `avhw.rs`. /// Wayland output transform enum, matching `wl_output::Transform`. #[derive(Debug, Clone, Copy, PartialEq, Eq)]