diff --git a/rs/justfile b/rs/justfile index daca07a685a..1fcc5f0825b 100644 --- a/rs/justfile +++ b/rs/justfile @@ -710,7 +710,7 @@ c-tests: # Compile the workspace at the feature extremes. features: cargo check --locked --workspace {{ no_fuzz }} --all-targets --no-default-features - cargo hack check --locked -p moq-tokio --each-feature --features aws-lc-rs + cargo hack check --locked -p moq-tokio --each-feature --exclude-features _transport --features aws-lc-rs cargo check --locked -p moq-relay --no-default-features just rs relay-minimal cargo check --locked -p moq-cli --no-default-features diff --git a/rs/moq-cli/src/args.rs b/rs/moq-cli/src/args.rs index 963d8b429c8..07e38f417d0 100644 --- a/rs/moq-cli/src/args.rs +++ b/rs/moq-cli/src/args.rs @@ -1717,7 +1717,7 @@ mod tests { let Command::Play(play) = &cli.stages[0] else { panic!("expected play") }; - assert_eq!(play.delay, Duration::from_millis(100)); + assert_eq!(play.delay, Duration::from_millis(100).into()); assert_eq!(play.select.video_name.as_deref(), Some("hd")); assert!(cli.moq.validate().is_ok()); assert!(play.validate().is_ok()); diff --git a/rs/moq-relay/tests/lan_mesh.rs b/rs/moq-relay/tests/lan_mesh.rs index 8320ad6d14e..0d8dbf5ee87 100644 --- a/rs/moq-relay/tests/lan_mesh.rs +++ b/rs/moq-relay/tests/lan_mesh.rs @@ -14,6 +14,8 @@ //! moq --connect http://127.0.0.1:4443 --connect-tls-insecure export ts > /dev/null //! ``` +#![cfg(feature = "cluster-lan")] + use std::time::Duration; use moq_relay::cluster; diff --git a/rs/moq-uring/Cargo.toml b/rs/moq-uring/Cargo.toml index 62811518ddf..7771e0fa17d 100644 --- a/rs/moq-uring/Cargo.toml +++ b/rs/moq-uring/Cargo.toml @@ -76,6 +76,7 @@ harness = false name = "echo_noq" path = "benches/echo_noq.rs" harness = false +required-features = ["noq"] [[bench]] name = "session_lite" diff --git a/rs/moq-uring/benches/echo_noq.rs b/rs/moq-uring/benches/echo_noq.rs index d93b738cd08..cf7ba43367a 100644 --- a/rs/moq-uring/benches/echo_noq.rs +++ b/rs/moq-uring/benches/echo_noq.rs @@ -60,6 +60,9 @@ mod linux { // poll the endpoint again, leaving the peer to time out mid-CONNECT. let (start_tx, start_rx) = std::sync::mpsc::channel::>(); let client = std::thread::spawn(move || { + // Enabling `ring` beside `aws-lc-rs` (as `--all-features` does) leaves rustls no implicit + // default, and the builder would panic on this thread while the server waits forever. + let _ = rustls::crypto::aws_lc_rs::default_provider().install_default(); let runtime = tokio::runtime::Builder::new_current_thread() .enable_all() .build() diff --git a/rs/moq-uring/tests/echo.rs b/rs/moq-uring/tests/echo.rs index c580adb0418..784d29e4be2 100644 --- a/rs/moq-uring/tests/echo.rs +++ b/rs/moq-uring/tests/echo.rs @@ -66,6 +66,9 @@ fn echo_noq_peer() { let (done_tx, done_rx) = tokio::sync::oneshot::channel(); let client = std::thread::spawn(move || { + // Enabling `ring` beside `aws-lc-rs` (as `--all-features` does) leaves rustls no implicit + // default, and the builder would panic on this thread while the server waits forever. + let _ = rustls::crypto::aws_lc_rs::default_provider().install_default(); let runtime = tokio::runtime::Builder::new_current_thread() .enable_all() .build() diff --git a/rs/moq-uring/tests/teardown.rs b/rs/moq-uring/tests/teardown.rs index aa761df5614..b0bde779f50 100644 --- a/rs/moq-uring/tests/teardown.rs +++ b/rs/moq-uring/tests/teardown.rs @@ -11,7 +11,7 @@ //! Kernel-gated: skips loudly below the Linux 6.12 floor (GitHub-hosted CI), //! and runs everywhere else. -#![cfg(target_os = "linux")] +#![cfg(all(target_os = "linux", feature = "noq"))] #[path = "support.rs"] mod support; diff --git a/rs/moq-video/src/capture/mediafoundation.rs b/rs/moq-video/src/capture/mediafoundation.rs index 6a81192caa0..bf6e2f360ff 100644 --- a/rs/moq-video/src/capture/mediafoundation.rs +++ b/rs/moq-video/src/capture/mediafoundation.rs @@ -193,7 +193,7 @@ impl Camera { device = %device_name, width, height, - framerate, + framerate = ?framerate, gpu = device.is_some(), "opened Media Foundation capture" ); diff --git a/rs/moq-video/src/capture/pipewire.rs b/rs/moq-video/src/capture/pipewire.rs index e8fbb279023..0b0146aab79 100644 --- a/rs/moq-video/src/capture/pipewire.rs +++ b/rs/moq-video/src/capture/pipewire.rs @@ -1980,8 +1980,8 @@ mod tests { .await .unwrap_or_else(|error| panic!("read frame {i}: {error}")) .unwrap_or_else(|| panic!("no frame {i}")); - assert_eq!(frame.width(), stream.width()); - assert_eq!(frame.height(), stream.height()); + assert_eq!(frame.surface.width(), stream.width()); + assert_eq!(frame.surface.height(), stream.height()); } eprintln!("captured 5 frames at {}x{}", stream.width(), stream.height()); } diff --git a/rs/moq-video/src/render/renderer.rs b/rs/moq-video/src/render/renderer.rs index 9af45dd68b4..fa2049201ae 100644 --- a/rs/moq-video/src/render/renderer.rs +++ b/rs/moq-video/src/render/renderer.rs @@ -583,12 +583,12 @@ mod tests { let mut stream = crate::capture::open(&capture).await.expect("portal screen capture"); for index in 0..16 { - let surface = tokio::time::timeout(std::time::Duration::from_secs(5), stream.read()) + let frame = tokio::time::timeout(std::time::Duration::from_secs(5), stream.read()) .await .unwrap_or_else(|_| panic!("timed out waiting for frame {index}")) .unwrap_or_else(|error| panic!("capture failed before frame {index}: {error}")) .unwrap_or_else(|| panic!("capture ended before frame {index}")); - let Surface::DmaBuf(buffer) = &surface else { + let Surface::DmaBuf(buffer) = &frame.surface else { panic!("frame {index} used shared memory instead of DMA-BUF"); }; assert!( @@ -603,7 +603,6 @@ mod tests { buffer.format().as_raw() ); - let frame = Frame::new(surface, Timestamp::ZERO); let imported = renderer .source .import(&device, &frame.surface)