From 4b6b8690ab886ebdf1307951cffbe03e31280baa Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Wed, 22 Oct 2025 11:33:30 +0200 Subject: [PATCH] chore: remove `--cfg docsrs` to fix docs.rs builds (#14347) --- .changes/docsrs.md | 9 +++++++++ .github/CONTRIBUTING.md | 2 +- crates/tauri-build/Cargo.toml | 2 -- crates/tauri-plugin/Cargo.toml | 2 -- crates/tauri-runtime-wry/Cargo.toml | 4 ---- crates/tauri-runtime/Cargo.toml | 2 -- crates/tauri/Cargo.toml | 2 -- 7 files changed, 10 insertions(+), 13 deletions(-) create mode 100644 .changes/docsrs.md diff --git a/.changes/docsrs.md b/.changes/docsrs.md new file mode 100644 index 000000000..be7fe825c --- /dev/null +++ b/.changes/docsrs.md @@ -0,0 +1,9 @@ +--- +tauri: patch:bug +tauri-build: patch:bug +tauri-plugin: patch:bug +tauri-runtime: patch:bug +tauri-runtime-wry: patch:bug +--- + +Fixed an issue that caused docs.rs builds to fail. No user facing changes. diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index a797449d9..975b6d5ae 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -98,7 +98,7 @@ You can use `cargo install --path . --debug` to speed up test builds. You can build the Rust documentation locally running the following script: ```bash -$ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --open +$ cargo +nightly doc --all-features --open ``` ### Developing the JS API diff --git a/crates/tauri-build/Cargo.toml b/crates/tauri-build/Cargo.toml index 47c587587..6bd2d68f5 100644 --- a/crates/tauri-build/Cargo.toml +++ b/crates/tauri-build/Cargo.toml @@ -22,8 +22,6 @@ targets = [ "x86_64-linux-android", "x86_64-apple-ios", ] -rustc-args = ["--cfg", "docsrs"] -rustdoc-args = ["--cfg", "docsrs"] [dependencies] anyhow = "1" diff --git a/crates/tauri-plugin/Cargo.toml b/crates/tauri-plugin/Cargo.toml index a0108c068..f6dac8c65 100644 --- a/crates/tauri-plugin/Cargo.toml +++ b/crates/tauri-plugin/Cargo.toml @@ -12,8 +12,6 @@ rust-version.workspace = true [package.metadata.docs.rs] features = ["build", "runtime"] -rustc-args = ["--cfg", "docsrs"] -rustdoc-args = ["--cfg", "docsrs"] [features] build = [ diff --git a/crates/tauri-runtime-wry/Cargo.toml b/crates/tauri-runtime-wry/Cargo.toml index d0b24c964..ddade7b77 100644 --- a/crates/tauri-runtime-wry/Cargo.toml +++ b/crates/tauri-runtime-wry/Cargo.toml @@ -12,10 +12,6 @@ license.workspace = true edition.workspace = true rust-version.workspace = true -[package.metadata.docs.rs] -rustc-args = ["--cfg", "docsrs"] -rustdoc-args = ["--cfg", "docsrs"] - [dependencies] wry = { version = "0.53.4", default-features = false, features = [ "drag-drop", diff --git a/crates/tauri-runtime/Cargo.toml b/crates/tauri-runtime/Cargo.toml index aebc4209d..14e58799a 100644 --- a/crates/tauri-runtime/Cargo.toml +++ b/crates/tauri-runtime/Cargo.toml @@ -14,8 +14,6 @@ rust-version.workspace = true [package.metadata.docs.rs] all-features = true -rustc-args = ["--cfg", "docsrs"] -rustdoc-args = ["--cfg", "docsrs"] default-target = "x86_64-unknown-linux-gnu" targets = [ "x86_64-pc-windows-msvc", diff --git a/crates/tauri/Cargo.toml b/crates/tauri/Cargo.toml index 33eef1799..46a4ee722 100644 --- a/crates/tauri/Cargo.toml +++ b/crates/tauri/Cargo.toml @@ -26,8 +26,6 @@ features = [ "test", "specta", ] -rustc-args = ["--cfg", "docsrs"] -rustdoc-args = ["--cfg", "docsrs"] default-target = "x86_64-unknown-linux-gnu" targets = [ "x86_64-pc-windows-msvc",