diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index cdf2d5c61..7e77aab2e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -78,7 +78,7 @@ The code for Tauri Core is located in `[Tauri repo root]/core/tauri`, and the Ru You can build the Rust documentation locally running the following script: ```bash -$ RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --open +$ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --open ``` ### Developing the JS API diff --git a/core/tauri-build/Cargo.toml b/core/tauri-build/Cargo.toml index 40c39e84b..a8c85974f 100644 --- a/core/tauri-build/Cargo.toml +++ b/core/tauri-build/Cargo.toml @@ -14,7 +14,16 @@ rust-version = { workspace = true } [package.metadata.docs.rs] all-features = true -rustdoc-args = [ "--cfg", "doc_cfg" ] +default-target = "x86_64-unknown-linux-gnu" +targets = [ + "x86_64-pc-windows-msvc", + "x86_64-unknown-linux-gnu", + "x86_64-apple-darwin", + "x86_64-linux-android", + "x86_64-apple-ios" +] +rustc-args = [ "--cfg", "docsrs" ] +rustdoc-args = [ "--cfg", "docsrs" ] [dependencies] anyhow = "1" diff --git a/core/tauri-build/src/codegen/context.rs b/core/tauri-build/src/codegen/context.rs index f702ce212..e1991d206 100644 --- a/core/tauri-build/src/codegen/context.rs +++ b/core/tauri-build/src/codegen/context.rs @@ -14,7 +14,7 @@ use tauri_utils::config::{AppUrl, WindowUrl}; // TODO docs /// A builder for generating a Tauri application context during compile time. -#[cfg_attr(doc_cfg, doc(cfg(feature = "codegen")))] +#[cfg_attr(docsrs, doc(cfg(feature = "codegen")))] #[derive(Debug)] pub struct CodegenContext { dev: bool, diff --git a/core/tauri-build/src/lib.rs b/core/tauri-build/src/lib.rs index a998c9d4b..887918953 100644 --- a/core/tauri-build/src/lib.rs +++ b/core/tauri-build/src/lib.rs @@ -10,7 +10,7 @@ html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png", html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" )] -#![cfg_attr(doc_cfg, feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] use anyhow::Context; pub use anyhow::Result; @@ -37,7 +37,7 @@ pub mod mobile; mod static_vcruntime; #[cfg(feature = "codegen")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "codegen")))] +#[cfg_attr(docsrs, doc(cfg(feature = "codegen")))] pub use codegen::context::CodegenContext; fn copy_file(from: impl AsRef, to: impl AsRef) -> Result<()> { diff --git a/core/tauri-runtime-wry/Cargo.toml b/core/tauri-runtime-wry/Cargo.toml index 4ce11f790..9631d0e1d 100644 --- a/core/tauri-runtime-wry/Cargo.toml +++ b/core/tauri-runtime-wry/Cargo.toml @@ -13,7 +13,7 @@ edition = { workspace = true } rust-version = { workspace = true } [dependencies] -wry = { version = "0.34.1", default-features = false, features = [ "tao", "file-drop", "protocol" ] } +wry = { version = "0.34.2", default-features = false, features = [ "tao", "file-drop", "protocol" ] } tauri-runtime = { version = "1.0.0-alpha.3", path = "../tauri-runtime" } tauri-utils = { version = "2.0.0-alpha.9", path = "../tauri-utils" } raw-window-handle = "0.5" diff --git a/core/tauri-runtime/Cargo.toml b/core/tauri-runtime/Cargo.toml index 2a87d555a..c5b88ddcd 100644 --- a/core/tauri-runtime/Cargo.toml +++ b/core/tauri-runtime/Cargo.toml @@ -14,7 +14,8 @@ rust-version = { workspace = true } [package.metadata.docs.rs] all-features = true -rustdoc-args = [ "--cfg", "doc_cfg" ] +rustc-args = [ "--cfg", "docsrs" ] +rustdoc-args = [ "--cfg", "docsrs" ] default-target = "x86_64-unknown-linux-gnu" targets = [ "x86_64-pc-windows-msvc", diff --git a/core/tauri-runtime/src/lib.rs b/core/tauri-runtime/src/lib.rs index bf78aba2a..ec05c17e8 100644 --- a/core/tauri-runtime/src/lib.rs +++ b/core/tauri-runtime/src/lib.rs @@ -10,7 +10,7 @@ html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png", html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" )] -#![cfg_attr(doc_cfg, feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] use raw_window_handle::RawDisplayHandle; use serde::Deserialize; @@ -176,7 +176,7 @@ pub struct RunIteration { /// Application's activation policy. Corresponds to NSApplicationActivationPolicy. #[cfg(target_os = "macos")] -#[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))] +#[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] #[non_exhaustive] pub enum ActivationPolicy { /// Corresponds to NSApplicationActivationPolicyRegular. @@ -211,12 +211,12 @@ pub trait RuntimeHandle: Debug + Clone + Send + Sync + Sized + 'st /// Shows the application, but does not automatically focus it. #[cfg(target_os = "macos")] - #[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))] + #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] fn show(&self) -> Result<()>; /// Hides the application. #[cfg(target_os = "macos")] - #[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))] + #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] fn hide(&self) -> Result<()>; /// Finds an Android class in the project scope. @@ -261,7 +261,7 @@ pub trait Runtime: Debug + Sized + 'static { /// Creates a new webview runtime on any thread. #[cfg(any(windows, target_os = "linux"))] - #[cfg_attr(doc_cfg, doc(cfg(any(windows, target_os = "linux"))))] + #[cfg_attr(docsrs, doc(cfg(any(windows, target_os = "linux"))))] fn new_any_thread(args: RuntimeInitArgs) -> Result; /// Creates an `EventLoopProxy` that can be used to dispatch user events to the main event loop. @@ -282,17 +282,17 @@ pub trait Runtime: Debug + Sized + 'static { /// Sets the activation policy for the application. It is set to `NSApplicationActivationPolicyRegular` by default. #[cfg(target_os = "macos")] - #[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))] + #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] fn set_activation_policy(&mut self, activation_policy: ActivationPolicy); /// Shows the application, but does not automatically focus it. #[cfg(target_os = "macos")] - #[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))] + #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] fn show(&self); /// Hides the application. #[cfg(target_os = "macos")] - #[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))] + #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] fn hide(&self); /// Change the device event filter mode. diff --git a/core/tauri-runtime/src/webview.rs b/core/tauri-runtime/src/webview.rs index 12a08b44b..8788a5641 100644 --- a/core/tauri-runtime/src/webview.rs +++ b/core/tauri-runtime/src/webview.rs @@ -230,7 +230,7 @@ pub trait WindowBuilder: WindowBuilderBase { /// with alpha values different than `1.0` will produce a transparent window. #[cfg(any(not(target_os = "macos"), feature = "macos-private-api"))] #[cfg_attr( - doc_cfg, + docsrs, doc(cfg(any(not(target_os = "macos"), feature = "macos-private-api"))) )] #[must_use] diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 9ea014444..7d2bb572a 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -24,7 +24,8 @@ features = [ "protocol-asset", "test", ] -rustdoc-args = [ "--cfg", "doc_cfg" ] +rustc-args = [ "--cfg", "docsrs" ] +rustdoc-args = [ "--cfg", "docsrs" ] default-target = "x86_64-unknown-linux-gnu" targets = [ "x86_64-pc-windows-msvc", diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 211e3eb9d..4d32e989b 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -193,18 +193,18 @@ pub enum RunEvent { MainEventsCleared, /// Emitted when the user wants to open the specified resource with the app. #[cfg(any(target_os = "macos", target_os = "ios"))] - #[cfg_attr(doc_cfg, doc(cfg(any(target_os = "macos", feature = "ios"))))] + #[cfg_attr(docsrs, doc(cfg(any(target_os = "macos", feature = "ios"))))] Opened { /// The URL of the resources that is being open. urls: Vec, }, /// An event from a menu item, could be on the window menu bar, application menu bar (on macOS) or tray icon menu. #[cfg(desktop)] - #[cfg_attr(doc_cfg, doc(cfg(desktop)))] + #[cfg_attr(docsrs, doc(cfg(desktop)))] MenuEvent(crate::menu::MenuEvent), /// An event from a tray icon. #[cfg(all(desktop, feature = "tray-icon"))] - #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] + #[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] TrayIconEvent(crate::tray::TrayIconEvent), } @@ -506,7 +506,7 @@ macro_rules! shared_app_impl { /// Registers a global tray icon menu event listener. #[cfg(all(desktop, feature = "tray-icon"))] - #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] + #[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] pub fn on_tray_icon_event, TrayIconEvent) + Send + Sync + 'static>( &self, handler: F, @@ -523,7 +523,7 @@ macro_rules! shared_app_impl { /// Gets the first tray icon registered, /// usually the one configured in the Tauri configuration file. #[cfg(all(desktop, feature = "tray-icon"))] - #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] + #[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] pub fn tray(&self) -> Option> { self .manager @@ -540,7 +540,7 @@ macro_rules! shared_app_impl { /// /// Note that dropping the returned icon, will cause the tray icon to disappear. #[cfg(all(desktop, feature = "tray-icon"))] - #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] + #[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] pub fn remove_tray(&self) -> Option> { let mut tray_icons = self.manager.inner.tray_icons.lock().unwrap(); if !tray_icons.is_empty() { @@ -551,7 +551,7 @@ macro_rules! shared_app_impl { /// Gets a tray icon using the provided id. #[cfg(all(desktop, feature = "tray-icon"))] - #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] + #[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] pub fn tray_by_id<'a, I>(&self, id: &'a I) -> Option> where I: ?Sized, @@ -572,7 +572,7 @@ macro_rules! shared_app_impl { /// /// Note that dropping the returned icon, will cause the tray icon to disappear. #[cfg(all(desktop, feature = "tray-icon"))] - #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] + #[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] pub fn remove_tray_by_id<'a, I>(&self, id: &'a I) -> Option> where I: ?Sized, @@ -824,7 +824,7 @@ impl App { /// app.run(|_app_handle, _event| {}); /// ``` #[cfg(target_os = "macos")] - #[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))] + #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] pub fn set_activation_policy(&mut self, activation_policy: ActivationPolicy) { self .runtime @@ -1046,7 +1046,7 @@ impl Builder { /// /// - **macOS:** on macOS the application *must* be executed on the main thread, so this function is not exposed. #[cfg(any(windows, target_os = "linux"))] - #[cfg_attr(doc_cfg, doc(cfg(any(windows, target_os = "linux"))))] + #[cfg_attr(docsrs, doc(cfg(any(windows, target_os = "linux"))))] #[must_use] pub fn any_thread(mut self) -> Self { self.runtime_any_thread = true; @@ -1176,7 +1176,7 @@ impl Builder { /// refers to a different `T`. /// /// Managed state can be retrieved by any command handler via the - /// [`State`](crate::State) guard. In particular, if a value of type `T` + /// [`State`] guard. In particular, if a value of type `T` /// is managed by Tauri, adding `State` to the list of arguments in a /// command handler instructs Tauri to retrieve the managed value. /// Additionally, [`state`](crate::Manager#method.state) can be used to retrieve the value manually. @@ -1859,7 +1859,7 @@ fn on_event_loop_event, RunEvent) + 'static>( /// Make `Wry` the default `Runtime` for `Builder` #[cfg(feature = "wry")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "wry")))] +#[cfg_attr(docsrs, doc(cfg(feature = "wry")))] impl Default for Builder { fn default() -> Self { Self::new() diff --git a/core/tauri/src/error.rs b/core/tauri/src/error.rs index 986714f8d..c8d8645dd 100644 --- a/core/tauri/src/error.rs +++ b/core/tauri/src/error.rs @@ -100,12 +100,12 @@ pub enum Error { /// Tray icon error. #[error("tray icon error: {0}")] #[cfg(all(desktop, feature = "tray-icon"))] - #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] + #[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] Tray(#[from] tray_icon::Error), /// Bad tray icon error. #[error(transparent)] #[cfg(all(desktop, feature = "tray-icon"))] - #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] + #[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] BadTrayIcon(#[from] tray_icon::BadIcon), /// Path does not have a parent. #[error("path does not have a parent")] diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index b1297ac97..0937182aa 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -48,7 +48,7 @@ html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" )] #![warn(missing_docs, rust_2018_idioms)] -#![cfg_attr(doc_cfg, feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] /// Setups the binding that initializes an iOS plugin. #[cfg(target_os = "ios")] @@ -97,7 +97,7 @@ pub mod scope; mod state; #[cfg(all(desktop, feature = "tray-icon"))] -#[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] +#[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] pub mod tray; pub use tauri_utils as utils; @@ -105,11 +105,11 @@ pub use http; /// A Tauri [`Runtime`] wrapper around wry. #[cfg(feature = "wry")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "wry")))] +#[cfg_attr(docsrs, doc(cfg(feature = "wry")))] pub type Wry = tauri_runtime_wry::Wry; #[cfg(all(feature = "wry", target_os = "android"))] -#[cfg_attr(doc_cfg, doc(cfg(all(feature = "wry", target_os = "android"))))] +#[cfg_attr(docsrs, doc(cfg(all(feature = "wry", target_os = "android"))))] #[doc(hidden)] #[macro_export] macro_rules! android_binding { @@ -168,11 +168,11 @@ use std::{ }; #[cfg(feature = "wry")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "wry")))] +#[cfg_attr(docsrs, doc(cfg(feature = "wry")))] pub use tauri_runtime_wry::webview_version; #[cfg(target_os = "macos")] -#[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))] +#[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] pub use runtime::ActivationPolicy; #[cfg(target_os = "macos")] @@ -251,7 +251,7 @@ pub enum EventLoopMessage { MenuEvent(menu::MenuEvent), /// An event from a menu item, could be on the window menu bar, application menu bar (on macOS) or tray icon menu. #[cfg(all(desktop, feature = "tray-icon"))] - #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] + #[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] TrayIconEvent(tray::TrayIconEvent), } @@ -302,11 +302,11 @@ pub use pattern::Pattern; pub enum Icon { /// Icon from file path. #[cfg(any(feature = "icon-ico", feature = "icon-png"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "icon-ico", feature = "icon-png"))))] + #[cfg_attr(docsrs, doc(cfg(any(feature = "icon-ico", feature = "icon-png"))))] File(std::path::PathBuf), /// Icon from raw RGBA bytes. Width and height is parsed at runtime. #[cfg(any(feature = "icon-ico", feature = "icon-png"))] - #[cfg_attr(doc_cfg, doc(cfg(any(feature = "icon-ico", feature = "icon-png"))))] + #[cfg_attr(docsrs, doc(cfg(any(feature = "icon-ico", feature = "icon-png"))))] Raw(Vec), /// Icon from raw RGBA bytes. Rgba { @@ -454,7 +454,7 @@ impl Context { /// The icon to use on the system tray UI. #[cfg(all(desktop, feature = "tray-icon"))] - #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] + #[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] #[inline(always)] pub fn tray_icon(&self) -> Option<&Icon> { self.tray_icon.as_ref() @@ -462,7 +462,7 @@ impl Context { /// A mutable reference to the icon to use on the tray icon. #[cfg(all(desktop, feature = "tray-icon"))] - #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] + #[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] #[inline(always)] pub fn tray_icon_mut(&mut self) -> &mut Option { &mut self.tray_icon @@ -513,7 +513,7 @@ impl Context { /// Sets the app tray icon. #[cfg(all(desktop, feature = "tray-icon"))] - #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] + #[cfg_attr(docsrs, doc(cfg(all(desktop, feature = "tray-icon"))))] #[inline(always)] pub fn set_tray_icon(&mut self, icon: Icon) { self.tray_icon.replace(icon); @@ -859,7 +859,7 @@ pub(crate) mod sealed { } #[cfg(any(test, feature = "test"))] -#[cfg_attr(doc_cfg, doc(cfg(feature = "test")))] +#[cfg_attr(docsrs, doc(cfg(feature = "test")))] pub mod test; #[cfg(test)] diff --git a/core/tauri/src/test/mock_runtime.rs b/core/tauri/src/test/mock_runtime.rs index d704a4736..5df77e7f8 100644 --- a/core/tauri/src/test/mock_runtime.rs +++ b/core/tauri/src/test/mock_runtime.rs @@ -272,7 +272,7 @@ impl WindowBuilder for MockWindowBuilder { #[cfg(any(not(target_os = "macos"), feature = "macos-private-api"))] #[cfg_attr( - doc_cfg, + docsrs, doc(cfg(any(not(target_os = "macos"), feature = "macos-private-api"))) )] fn transparent(self, transparent: bool) -> Self { @@ -777,15 +777,15 @@ impl Runtime for MockRuntime { } #[cfg(target_os = "macos")] - #[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))] + #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] fn set_activation_policy(&mut self, activation_policy: tauri_runtime::ActivationPolicy) {} #[cfg(target_os = "macos")] - #[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))] + #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] fn show(&self) {} #[cfg(target_os = "macos")] - #[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))] + #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] fn hide(&self) {} fn set_device_event_filter(&mut self, filter: DeviceEventFilter) {} diff --git a/core/tauri/src/window/mod.rs b/core/tauri/src/window/mod.rs index 38349526e..0f536baa1 100644 --- a/core/tauri/src/window/mod.rs +++ b/core/tauri/src/window/mod.rs @@ -669,7 +669,7 @@ impl<'a, R: Runtime> WindowBuilder<'a, R> { /// with alpha values different than `1.0` will produce a transparent window. #[cfg(any(not(target_os = "macos"), feature = "macos-private-api"))] #[cfg_attr( - doc_cfg, + docsrs, doc(cfg(any(not(target_os = "macos"), feature = "macos-private-api"))) )] #[must_use] @@ -1079,7 +1079,7 @@ impl<'de, R: Runtime> CommandArg<'de, R> for Window { /// The platform webview handle. Accessed with [`Window#method.with_webview`]; #[cfg(feature = "wry")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "wry")))] +#[cfg_attr(docsrs, doc(cfg(feature = "wry")))] pub struct PlatformWebview(tauri_runtime_wry::Webview); #[cfg(feature = "wry")] @@ -1093,7 +1093,7 @@ impl PlatformWebview { target_os = "openbsd" ))] #[cfg_attr( - doc_cfg, + docsrs, doc(cfg(any( target_os = "linux", target_os = "dragonfly", @@ -1108,7 +1108,7 @@ impl PlatformWebview { /// Returns the WebView2 controller. #[cfg(windows)] - #[cfg_attr(doc_cfg, doc(cfg(windows)))] + #[cfg_attr(docsrs, doc(cfg(windows)))] pub fn controller( &self, ) -> webview2_com::Microsoft::Web::WebView2::Win32::ICoreWebView2Controller { @@ -1119,7 +1119,7 @@ impl PlatformWebview { /// /// [WKWebView]: https://developer.apple.com/documentation/webkit/wkwebview #[cfg(any(target_os = "macos", target_os = "ios"))] - #[cfg_attr(doc_cfg, doc(cfg(any(target_os = "macos", target_os = "ios"))))] + #[cfg_attr(docsrs, doc(cfg(any(target_os = "macos", target_os = "ios"))))] pub fn inner(&self) -> cocoa::base::id { self.0.webview } @@ -1128,7 +1128,7 @@ impl PlatformWebview { /// /// [controller]: https://developer.apple.com/documentation/webkit/wkusercontentcontroller #[cfg(any(target_os = "macos", target_os = "ios"))] - #[cfg_attr(doc_cfg, doc(cfg(any(target_os = "macos", target_os = "ios"))))] + #[cfg_attr(docsrs, doc(cfg(any(target_os = "macos", target_os = "ios"))))] pub fn controller(&self) -> cocoa::base::id { self.0.manager } @@ -1137,7 +1137,7 @@ impl PlatformWebview { /// /// [NSWindow]: https://developer.apple.com/documentation/appkit/nswindow #[cfg(target_os = "macos")] - #[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))] + #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] pub fn ns_window(&self) -> cocoa::base::id { self.0.ns_window } @@ -1146,7 +1146,7 @@ impl PlatformWebview { /// /// [UIViewController]: https://developer.apple.com/documentation/uikit/uiviewcontroller #[cfg(target_os = "ios")] - #[cfg_attr(doc_cfg, doc(cfg(target_os = "ios")))] + #[cfg_attr(docsrs, doc(cfg(target_os = "ios")))] pub fn view_controller(&self) -> cocoa::base::id { self.0.view_controller } @@ -1267,7 +1267,7 @@ impl Window { /// } /// ``` #[cfg(feature = "wry")] - #[cfg_attr(doc_cfg, doc(feature = "wry"))] + #[cfg_attr(docsrs, doc(feature = "wry"))] pub fn with_webview( &self, f: F, @@ -2429,7 +2429,7 @@ impl Window { /// }); /// ``` #[cfg(any(debug_assertions, feature = "devtools"))] - #[cfg_attr(doc_cfg, doc(cfg(any(debug_assertions, feature = "devtools"))))] + #[cfg_attr(docsrs, doc(cfg(any(debug_assertions, feature = "devtools"))))] pub fn open_devtools(&self) { self.window.dispatcher.open_devtools(); } @@ -2462,7 +2462,7 @@ impl Window { /// }); /// ``` #[cfg(any(debug_assertions, feature = "devtools"))] - #[cfg_attr(doc_cfg, doc(cfg(any(debug_assertions, feature = "devtools"))))] + #[cfg_attr(docsrs, doc(cfg(any(debug_assertions, feature = "devtools"))))] pub fn close_devtools(&self) { self.window.dispatcher.close_devtools(); } @@ -2493,7 +2493,7 @@ impl Window { /// }); /// ``` #[cfg(any(debug_assertions, feature = "devtools"))] - #[cfg_attr(doc_cfg, doc(cfg(any(debug_assertions, feature = "devtools"))))] + #[cfg_attr(docsrs, doc(cfg(any(debug_assertions, feature = "devtools"))))] pub fn is_devtools_open(&self) -> bool { self .window diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index caa910fd5..9db83adff 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -4503,9 +4503,9 @@ dependencies = [ [[package]] name = "wry" -version = "0.34.1" +version = "0.34.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ad4935cc1cbd02e7cfcf41baa44e35f134c108389be3949d8b369eb69e741b" +checksum = "3f1e29660f22d8eec141f41f59b7fef231e4113c370c89b90ae3a0db8dec1927" dependencies = [ "base64", "block",