Skip to content

Commit

Permalink
Fix Rust docs build
Browse files Browse the repository at this point in the history
Fixes #1270
  • Loading branch information
ibc committed Dec 18, 2023
1 parent f9c081c commit 49c8f24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions rust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# NEXT

* Update h264-profile-level-id dependency to 0.2.0.
* Fix docs build.

# 0.13.0

Expand Down
10 changes: 5 additions & 5 deletions worker/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down Expand Up @@ -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('\\', "/"));

Expand Down

0 comments on commit 49c8f24

Please sign in to comment.