From 043eba003a91cdbb9028ba210425f4cb71e18ab3 Mon Sep 17 00:00:00 2001 From: Andre Roelofs Date: Mon, 19 Jan 2026 10:44:06 +0100 Subject: [PATCH 1/7] chore: satisfy clippy small talk and relax constrains on most dependencies --- taurpc/Cargo.toml | 32 +++++++++++++++----------------- taurpc/src/export.rs | 12 ++++++------ taurpc/taurpc-macros/Cargo.toml | 11 +++++------ 3 files changed, 26 insertions(+), 29 deletions(-) diff --git a/taurpc/Cargo.toml b/taurpc/Cargo.toml index b749611..051dcbb 100644 --- a/taurpc/Cargo.toml +++ b/taurpc/Cargo.toml @@ -10,30 +10,28 @@ repository = "https://github.com/MatsDK/TauRPC" license = "MIT OR Apache-2.0" readme = "../README.md" categories = [] -rust = "1.71" +rust-version = "1.71" [package.metadata."docs.rs"] all-features = true rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"] -[dependencies] -taurpc-macros = { path = "./taurpc-macros", version = "=0.5.2" } - -itertools = "0.13.0" -tauri = { version = "2.2.5", features = ["specta"] } -serde = { version = "1.0.215", features = ["derive"] } -serde_json = "1.0.133" -tokio = { version = "1", features = ["full"] } - -specta = { version = "=2.0.0-rc.22", features=["export", "function"] } -specta-serde = { version = "0.0.9", features = [] } -specta-typescript = { version = "0.0.9", features = ["function"] } -specta-macros = { version = "2.0.0-rc.17" } -heck = "0.5.0" -anyhow = "1.0.95" - [workspace] members = [ "taurpc-macros", ] + +[dependencies] +anyhow = "1" +heck = "0" +itertools = "0" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +specta = { version = "=2.0.0-rc.22", features = ["export", "function"] } +specta-serde = { version = "0", features = [] } +specta-macros = { version = "2.0.0-rc.18" } +specta-typescript = { version = "0", features = ["function"] } +tauri = { version = "2", features = ["specta"] } +taurpc-macros = { path = "./taurpc-macros", version = "=0.5.2" } +tokio = { version = "1", features = ["full"] } diff --git a/taurpc/src/export.rs b/taurpc/src/export.rs index 0b108dd..f9d6a5e 100644 --- a/taurpc/src/export.rs +++ b/taurpc/src/export.rs @@ -77,9 +77,9 @@ pub(super) fn export_types( .context("Cannot open bindings file")?; try_write(&mut file, &export_config.header); - try_write(&mut file, &framework_header); - try_write(&mut file, &BOILERPLATE_TS_IMPORT); - try_write(&mut file, &body); + try_write(&mut file, framework_header); + try_write(&mut file, BOILERPLATE_TS_IMPORT); + try_write(&mut file, body); let args_entries: String = args_map .iter() @@ -90,7 +90,7 @@ pub(super) fn export_types( try_write(&mut file, &format!("const ARGS_MAP = {router_args}\n")); let functions_router = generate_functions_router(functions, type_map, &export_config); try_write(&mut file, &functions_router); - try_write(&mut file, &BOILERPLATE_TS_EXPORT); + try_write(&mut file, BOILERPLATE_TS_EXPORT); if export_path.ends_with("node_modules\\.taurpc\\index.ts") { let package_json_path = Path::new(&export_path) @@ -116,7 +116,7 @@ fn generate_functions_router( ) -> String { let functions = functions .iter() - .filter_map(|(path, path_functions)| { + .map(|(path, path_functions)| { let mut function_names_and_funcs: Vec<_> = path_functions.iter().map(|f| (f.name(), f)).collect(); function_names_and_funcs.sort_by(|a, b| a.0.cmp(b.0)); @@ -129,7 +129,7 @@ fn generate_functions_router( .unwrap_or_default() .join(", \n"); - Some(format!(r#""{path}": {{{functions}}}"#)) + format!(r#""{path}": {{{functions}}}"#) }) .collect::>() .join(",\n"); diff --git a/taurpc/taurpc-macros/Cargo.toml b/taurpc/taurpc-macros/Cargo.toml index 1d460d5..b91bc83 100644 --- a/taurpc/taurpc-macros/Cargo.toml +++ b/taurpc/taurpc-macros/Cargo.toml @@ -4,19 +4,18 @@ version = "0.5.2" edition = "2021" description = "Macros for the taurpc crate" documentation = "https://docs.rs/taurpc" +readme = "README.md" homepage = "https://github.com/MatsDK/TauRPC" repository = "https://github.com/MatsDK/TauRPC" license = "MIT OR Apache-2.0" -readme = "README.md" [lib] proc-macro = true [dependencies] -syn = { version = "2.0.15", features = ["full"] } -quote = "1.0.26" -proc-macro2 = "1.0.56" +proc-macro2 = "1" +quote = "1" serde = { version = "1", features = ["derive"] } - -serde_json = "1.0.96" +serde_json = "1" +syn = { version = "2", features = ["full"] } # convert_case = "0.6" From 9a4263e85ba67eabbb8a148ae8d6af1d1ef8bf72 Mon Sep 17 00:00:00 2001 From: Andre Roelofs Date: Mon, 19 Jan 2026 10:51:06 +0100 Subject: [PATCH 2/7] chore: bump minimum rust-version to the one currenly used by tauri --- taurpc/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taurpc/Cargo.toml b/taurpc/Cargo.toml index 051dcbb..d0d5e8f 100644 --- a/taurpc/Cargo.toml +++ b/taurpc/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/MatsDK/TauRPC" license = "MIT OR Apache-2.0" readme = "../README.md" categories = [] -rust-version = "1.71" +rust-version = "1.77.2" [package.metadata."docs.rs"] all-features = true From 56575bdc250c27537b35b459e36814ddc66d5ea9 Mon Sep 17 00:00:00 2001 From: Andre Roelofs Date: Mon, 19 Jan 2026 11:01:02 +0100 Subject: [PATCH 3/7] fix: typos in documentation --- example/src-tauri/Cargo.lock | 4 ++-- taurpc/Cargo.lock | 4 ++-- taurpc/Cargo.toml | 2 +- taurpc/src/lib.rs | 46 ++++++++++++++++++------------------ 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/example/src-tauri/Cargo.lock b/example/src-tauri/Cargo.lock index 6f0a17a..eec670e 100644 --- a/example/src-tauri/Cargo.lock +++ b/example/src-tauri/Cargo.lock @@ -3706,10 +3706,10 @@ dependencies = [ [[package]] name = "taurpc" -version = "0.5.2" +version = "0.5.3" dependencies = [ "anyhow", - "heck 0.5.0", + "heck 0.4.1", "itertools", "serde", "serde_json", diff --git a/taurpc/Cargo.lock b/taurpc/Cargo.lock index a4d9de2..9000bf4 100644 --- a/taurpc/Cargo.lock +++ b/taurpc/Cargo.lock @@ -3593,10 +3593,10 @@ dependencies = [ [[package]] name = "taurpc" -version = "0.5.2" +version = "0.5.3" dependencies = [ "anyhow", - "heck 0.5.0", + "heck 0.4.1", "itertools", "serde", "serde_json", diff --git a/taurpc/Cargo.toml b/taurpc/Cargo.toml index d0d5e8f..d3c4c37 100644 --- a/taurpc/Cargo.toml +++ b/taurpc/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "taurpc" authors = ["MatsDK"] -version = "0.5.2" +version = "0.5.3" edition = "2021" description = "A type-safe IPC layer for tauri commands" documentation = "https://docs.rs/taurpc" diff --git a/taurpc/src/lib.rs b/taurpc/src/lib.rs index 602132a..0725ee8 100644 --- a/taurpc/src/lib.rs +++ b/taurpc/src/lib.rs @@ -56,7 +56,7 @@ pub trait TauRpcHandler: Sized { /// /// /// # Examples -/// ```rust +/// ```rust,ignore /// #[taurpc::procedures] /// trait Api { /// async fn hello_world(); @@ -75,7 +75,7 @@ pub trait TauRpcHandler: Sized { /// async fn main() { /// tauri::Builder::default() /// .invoke_handler( -/// taurpc::create_ipc_handler(ApiImpl.into_handler()); +/// taurpc::create_ipc_handler(ApiImpl.into_handler()) /// ) /// .run(tauri::generate_context!()) /// .expect("error while running tauri application"); @@ -185,14 +185,14 @@ impl EventTrigger { /// The trait must have the `#[taurpc::procedures]` macro and the nested routes should have `#[taurpc::procedures(path = "path")]`. /// /// # Examples -/// ```rust +/// ```rust,ignore /// #[taurpc::procedures] /// trait Api { } /// /// #[derive(Clone)] /// struct ApiImpl; /// -/// #[taurpc::resolveres] +/// #[taurpc::resolvers] /// impl Api for ApiImpl { } /// /// #[taurpc::procedures(path = "events")] @@ -201,12 +201,12 @@ impl EventTrigger { /// #[derive(Clone)] /// struct EventsImpl; /// -/// #[taurpc::resolveres] +/// #[taurpc::resolvers] /// impl Events for EventsImpl { } /// /// #[tokio::main] /// async fn main() { -/// let router = Router::new() +/// let router = taurpc::Router::new() /// .merge(ApiImpl.into_handler()) /// .merge(EventsImpl.into_handler()); /// @@ -242,14 +242,14 @@ impl Router { /// `specta_typescript::Typescript` for all the configuration options. /// /// Example: - /// ```rust - /// let router = Router::new() - /// .export_config( - /// specta_typescript::Typescript::default() - /// .header("// My header\n") - /// .bigint(specta_typescript::BigIntExportBehavior::String), - /// ) - /// .merge(...); + /// ```rust,ignore + /// let router = taurpc::Router::new() + /// .export_config( + /// specta_typescript::Typescript::default() + /// .header("// My header\n") + /// .bigint(specta_typescript::BigIntExportBehavior::String), + /// ) + /// .merge(ApiImpl.into_handler()); /// ``` pub fn export_config(mut self, config: specta_typescript::Typescript) -> Self { self.export_config = config; @@ -258,10 +258,10 @@ impl Router { /// Add routes to the router, accepts a struct for which a `#[taurpc::procedures]` trait is implemented /// - /// ```rust - /// let router = Router::new() - /// .merge(ApiImpl.into_handler()) - /// .merge(EventsImpl.into_handler()); + /// ```rust,ignore + /// let router = taurpc::Router::new() + /// .merge(ApiImpl.into_handler()) + /// .merge(EventsImpl.into_handler()); /// ``` pub fn merge>(mut self, handler: H) -> Self { if let Some(path) = H::EXPORT_PATH { @@ -282,11 +282,11 @@ impl Router { /// Create a handler out of the router that allows your IPCs to be called from the frontend, /// and generate the corresponding types. Use this inside `.invoke_handler()` on the tauri::Builder. /// - /// ```rust - /// tauri::Builder::default() - /// .invoke_handler(router.into_handler()) - /// .run(tauri::generate_context!()) - /// .expect("error while running tauri application"); + /// ```rust,ignore + /// tauri::Builder::default() + /// .invoke_handler(router.into_handler()) + /// .run(tauri::generate_context!()) + /// .expect("error while running tauri application"); /// ``` pub fn into_handler(self) -> impl Fn(Invoke) -> bool { // Only export in development mode From 25603741d38ef42ede7d3b051853db530a09c03e Mon Sep 17 00:00:00 2001 From: Andre Roelofs Date: Mon, 19 Jan 2026 11:04:25 +0100 Subject: [PATCH 4/7] chore: bump macros crate to 0.5.3 --- example/src-tauri/Cargo.lock | 2 +- taurpc/Cargo.lock | 2 +- taurpc/Cargo.toml | 2 +- taurpc/taurpc-macros/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/src-tauri/Cargo.lock b/example/src-tauri/Cargo.lock index eec670e..c9fac7a 100644 --- a/example/src-tauri/Cargo.lock +++ b/example/src-tauri/Cargo.lock @@ -3724,7 +3724,7 @@ dependencies = [ [[package]] name = "taurpc-macros" -version = "0.5.2" +version = "0.5.3" dependencies = [ "proc-macro2", "quote", diff --git a/taurpc/Cargo.lock b/taurpc/Cargo.lock index 9000bf4..f6e9105 100644 --- a/taurpc/Cargo.lock +++ b/taurpc/Cargo.lock @@ -3611,7 +3611,7 @@ dependencies = [ [[package]] name = "taurpc-macros" -version = "0.5.2" +version = "0.5.3" dependencies = [ "proc-macro2", "quote", diff --git a/taurpc/Cargo.toml b/taurpc/Cargo.toml index d3c4c37..d9a7223 100644 --- a/taurpc/Cargo.toml +++ b/taurpc/Cargo.toml @@ -33,5 +33,5 @@ specta-serde = { version = "0", features = [] } specta-macros = { version = "2.0.0-rc.18" } specta-typescript = { version = "0", features = ["function"] } tauri = { version = "2", features = ["specta"] } -taurpc-macros = { path = "./taurpc-macros", version = "=0.5.2" } +taurpc-macros = { path = "./taurpc-macros", version = "=0.5.3" } tokio = { version = "1", features = ["full"] } diff --git a/taurpc/taurpc-macros/Cargo.toml b/taurpc/taurpc-macros/Cargo.toml index b91bc83..6207320 100644 --- a/taurpc/taurpc-macros/Cargo.toml +++ b/taurpc/taurpc-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "taurpc-macros" -version = "0.5.2" +version = "0.5.3" edition = "2021" description = "Macros for the taurpc crate" documentation = "https://docs.rs/taurpc" From c4e9170200af19d8485978b5dd36951133e0cd47 Mon Sep 17 00:00:00 2001 From: Andre Roelofs Date: Mon, 19 Jan 2026 11:16:50 +0100 Subject: [PATCH 5/7] chore: bump version in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ac319c3..38ec22b 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ First, add the following crates to your `Cargo.toml`: # src-tauri/Cargo.toml [dependencies] -taurpc = "0.5.2" +taurpc = "0.5.3" specta = { version = "=2.0.0-rc.22", features = ["derive"] } # specta-typescript = "0.0.9" From 0e2954e52d2b9fdcc11fca4272f79ea8be0082fe Mon Sep 17 00:00:00 2001 From: Andre Roelofs Date: Mon, 19 Jan 2026 12:23:57 +0100 Subject: [PATCH 6/7] chore: bump version to 0.6.0 --- taurpc/Cargo.lock | 4 ++-- taurpc/Cargo.toml | 8 ++++---- taurpc/taurpc-macros/Cargo.toml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/taurpc/Cargo.lock b/taurpc/Cargo.lock index f6e9105..faf4e80 100644 --- a/taurpc/Cargo.lock +++ b/taurpc/Cargo.lock @@ -3593,7 +3593,7 @@ dependencies = [ [[package]] name = "taurpc" -version = "0.5.3" +version = "0.6.0" dependencies = [ "anyhow", "heck 0.4.1", @@ -3611,7 +3611,7 @@ dependencies = [ [[package]] name = "taurpc-macros" -version = "0.5.3" +version = "0.6.0" dependencies = [ "proc-macro2", "quote", diff --git a/taurpc/Cargo.toml b/taurpc/Cargo.toml index d9a7223..be59a0a 100644 --- a/taurpc/Cargo.toml +++ b/taurpc/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "taurpc" authors = ["MatsDK"] -version = "0.5.3" +version = "0.6.0" edition = "2021" description = "A type-safe IPC layer for tauri commands" documentation = "https://docs.rs/taurpc" @@ -28,10 +28,10 @@ heck = "0" itertools = "0" serde = { version = "1", features = ["derive"] } serde_json = "1" -specta = { version = "=2.0.0-rc.22", features = ["export", "function"] } -specta-serde = { version = "0", features = [] } +specta = { version = "2.0.0-rc.22", features = ["export", "function"] } specta-macros = { version = "2.0.0-rc.18" } +specta-serde = { version = "0", features = [] } specta-typescript = { version = "0", features = ["function"] } tauri = { version = "2", features = ["specta"] } -taurpc-macros = { path = "./taurpc-macros", version = "=0.5.3" } +taurpc-macros = { path = "./taurpc-macros", version = "=0.6.0" } tokio = { version = "1", features = ["full"] } diff --git a/taurpc/taurpc-macros/Cargo.toml b/taurpc/taurpc-macros/Cargo.toml index 6207320..e26e765 100644 --- a/taurpc/taurpc-macros/Cargo.toml +++ b/taurpc/taurpc-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "taurpc-macros" -version = "0.5.3" +version = "0.6.0" edition = "2021" description = "Macros for the taurpc crate" documentation = "https://docs.rs/taurpc" From 1539787f504caf476741838ded43539a77703be3 Mon Sep 17 00:00:00 2001 From: Andre Roelofs Date: Mon, 19 Jan 2026 12:26:21 +0100 Subject: [PATCH 7/7] chore: bump version to 0.6.0 in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38ec22b..0457320 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ First, add the following crates to your `Cargo.toml`: # src-tauri/Cargo.toml [dependencies] -taurpc = "0.5.3" +taurpc = "0.6.0" specta = { version = "=2.0.0-rc.22", features = ["derive"] } # specta-typescript = "0.0.9"