diff --git a/.github/workflows/mediasoup-rust.yaml b/.github/workflows/mediasoup-rust.yaml index 0778129e84..f89b64b9ab 100644 --- a/.github/workflows/mediasoup-rust.yaml +++ b/.github/workflows/mediasoup-rust.yaml @@ -46,3 +46,10 @@ jobs: - name: cargo test run: cargo test --verbose + + - name: cargo doc + run: cargo doc --locked --all --no-deps --lib + env: + DOCS_RS: '1' + RUSTDOCFLAGS: '-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links' + diff --git a/Cargo.lock b/Cargo.lock index 25f9f06ee3..7a0eadf2d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1028,13 +1028,12 @@ checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "h264-profile-level-id" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12ebc03fc4f14b7ddc94da90cfb28ba3edee2d926798a9eef89f8a27bbdbca5" +checksum = "45d0dbf6a9847b64c9b06938660891f983434dcc009b5ae6a58f5e34af74a649" dependencies = [ "bitpattern", "log", - "once_cell", "thiserror", ] diff --git a/rust/CHANGELOG.md b/rust/CHANGELOG.md index c00c8ae3d8..dad75c4f0f 100644 --- a/rust/CHANGELOG.md +++ b/rust/CHANGELOG.md @@ -3,6 +3,8 @@ # NEXT * Update h264-profile-level-id dependency to 0.2.0. +* Fix docs build (PR #1271). +* Rename `data_consumer::on_producer_resume` to `data_consumer::on_data_producer_resume` (PR #1271). # 0.13.0 diff --git a/rust/src/data_structures.rs b/rust/src/data_structures.rs index d1940de235..a5c2cc1856 100644 --- a/rust/src/data_structures.rs +++ b/rust/src/data_structures.rs @@ -45,7 +45,7 @@ impl AppData { } } -/// Listening protocol, IP and port for [`WebRtcServer`] to listen on. +/// Listening protocol, IP and port for [`WebRtcServer`](crate::webrtc_server::WebRtcServer) to listen on. /// /// # Notes on usage /// If you use "0.0.0.0" or "::" as ip value, then you need to also provide `announced_ip`. diff --git a/rust/src/router/data_consumer.rs b/rust/src/router/data_consumer.rs index 88ca1a5742..bafaffd240 100644 --- a/rust/src/router/data_consumer.rs +++ b/rust/src/router/data_consumer.rs @@ -903,7 +903,10 @@ impl DataConsumer { } /// Callback is called when the associated data producer is resumed. - pub fn on_producer_resume(&self, callback: F) -> HandlerId { + pub fn on_data_producer_resume( + &self, + callback: F, + ) -> HandlerId { self.inner() .handlers .data_producer_resume diff --git a/worker/build.rs b/worker/build.rs index 5139edef80..920d185d7b 100644 --- a/worker/build.rs +++ b/worker/build.rs @@ -2,11 +2,6 @@ use std::process::Command; use std::{env, fs}; fn main() { - if env::var("DOCS_RS").is_ok() { - // Skip everything when building docs on docs.rs - return; - } - // On Windows Rust always links against release version of MSVC runtime, thus requires // Release build here let build_type = if cfg!(all(debug_assertions, not(windows))) { @@ -45,6 +40,11 @@ fn main() { ) .expect("Failed to write generated Rust flatbuffers into fbs.rs"); + if env::var("DOCS_RS").is_ok() { + // Skip everything when building docs on docs.rs + return; + } + // Force forward slashes on Windows too so that is plays well with our tasks.py let mediasoup_out_dir = format!("{}/out", out_dir.replace('\\', "/"));