From 49c8f24a62d6990b69850a7df32ff7d0e0c7e89a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Mon, 18 Dec 2023 22:15:41 +0100 Subject: [PATCH] Fix Rust docs build Fixes #1270 --- rust/CHANGELOG.md | 1 + worker/build.rs | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/rust/CHANGELOG.md b/rust/CHANGELOG.md index c00c8ae3d8..25b4f1d56b 100644 --- a/rust/CHANGELOG.md +++ b/rust/CHANGELOG.md @@ -3,6 +3,7 @@ # NEXT * Update h264-profile-level-id dependency to 0.2.0. +* Fix docs build. # 0.13.0 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('\\', "/"));