diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml index 80f793b02..f1345e8c5 100644 --- a/examples/api/src-tauri/Cargo.toml +++ b/examples/api/src-tauri/Cargo.toml @@ -8,6 +8,7 @@ rust-version = { workspace = true } license = "Apache-2.0 OR MIT" [lib] +name = "api_lib" crate-type = [ "staticlib", "cdylib", "rlib" ] [build-dependencies] diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs index 5bb818519..ae23d314e 100644 --- a/examples/api/src-tauri/src/lib.rs +++ b/examples/api/src-tauri/src/lib.rs @@ -2,11 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -#![cfg_attr( - all(not(debug_assertions), target_os = "windows"), - windows_subsystem = "windows" -)] - mod cmd; #[cfg(desktop)] mod tray; diff --git a/examples/api/src-tauri/src/main.rs b/examples/api/src-tauri/src/main.rs index 2eb029af8..bbed006b8 100644 --- a/examples/api/src-tauri/src/main.rs +++ b/examples/api/src-tauri/src/main.rs @@ -6,6 +6,5 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] fn main() { - #[cfg(desktop)] - api::run(); + api_lib::run(); }