Hoist shared dependencies to workspace
Add a [workspace.dependencies] table to the root Cargo.toml and switch every member crate to inherit the shared version via workspace = true, keeping each crate's own feature set. Hoisted version-only: log, serde, serde_json, thiserror, tokio, uniffi, and smbcloud-gresiq-sdk. Dependency resolution is unchanged (Cargo.lock untouched). Closes #22 Co-Authored-By: siGit Code v1.6.5-acp <noreply@sigit.si>
Seto Elkahfi committed
Oct 9, 2026 at 21:08 UTC
69082fb11b687fc1642f9d1723b4e249fc2e8a70
4 files changed
+31
-19
Cargo.toml
+22
-10
@@ -16,6 +16,20 @@ resolver = "2"
16
members = [".", "uniffi-bindgen", "sdk/dart/rust", "sdk/react-native/rust"]
17
exclude = ["sdk/react-native/example"]
18
19
+# Shared dependency versions. Members opt in with `workspace = true` and keep
20
+# their own `features` list — only the version requirement is hoisted here, so
21
+# a single bump stays consistent across the root crate and the SDK crates.
22
+[workspace.dependencies]
23
+log = "0.4"
24
+serde = "1"
25
+serde_json = "1"
26
+thiserror = "2"
27
+tokio = "1"
28
+# Pinned to =0.31.0 — the version MUST be identical across the onde crate and
29
+# the uniffi-bindgen binary crate.
30
+uniffi = "=0.31.0"
31
+smbcloud-gresiq-sdk = "0.4.7"
32
+
33
[lib]
34
name = "onde"
35
# "lib" – normal Rust dependency for other crates.
@@ -80,23 +94,21 @@ mistralrs = { version = "0.9.3", package = "onde-mistralrs" }
94
[dependencies]
95
anyhow = "1"
96
home = "0.5.4"
83
-log = "^0.4"
97
+log = { workspace = true }
98
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
85
-serde = { version = "1.0", features = ["derive"] }
86
-serde_json = "1"
99
+serde = { workspace = true, features = ["derive"] }
100
+serde_json = { workspace = true }
101
88
-thiserror = "2"
89
-tokio = { version = "1", features = ["macros", "rt", "sync"] }
102
+thiserror = { workspace = true }
103
+tokio = { workspace = true, features = ["macros", "rt", "sync"] }
104
tsync = "2"
105
92
-# Pinned to =0.31.0 — the versions MUST be identical across the crate and
93
-# the uniffi-bindgen binary crate.
94
-uniffi = { version = "=0.31.0", features = ["tokio"] }
106
+uniffi = { workspace = true, features = ["tokio"] }
107
108
[dependencies.smbcloud-gresiq-sdk]
109
# 0.4.7 adds the document-gateway methods (upsert_document/get_collection) the
110
# M2 dual-write path uses. See ADR-0003 M2.
99
-version = "0.4.7"
111
+workspace = true
112
# path = "../smbcloud-cli/crates/smbcloud-gresiq-sdk"
113
114
[build-dependencies]
@@ -104,7 +116,7 @@ version = "0.4.7"
116
cc = "1"
117
dotenvy = "0.15"
118
# Required for UniFFI scaffolding code generation at build time.
107
-uniffi = { version = "=0.31.0", features = ["build"] }
119
+uniffi = { workspace = true, features = ["build"] }
120
121
# The target-conditional mistralrs deps above resolve to the published
122
# onde-mistralrs{,-core} 0.9.3 crates (setoelkahfi/mistral.rs fork,
sdk/dart/rust/Cargo.toml
+4
-4
@@ -10,7 +10,7 @@ crate-type = ["cdylib", "staticlib"]
10
[dependencies]
11
flutter_rust_bridge = "=2.12.0"
12
onde = { path = "../../../" }
13
-tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
14
-thiserror = "2"
15
-log = "0.4"
16
-smbcloud-gresiq-sdk = "0.4.7"
13
+tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
14
+thiserror = { workspace = true }
15
+log = { workspace = true }
16
+smbcloud-gresiq-sdk = { workspace = true }
sdk/react-native/rust/Cargo.toml
+4
-4
@@ -10,10 +10,10 @@ crate-type = ["staticlib", "cdylib"]
10
11
[dependencies]
12
onde = { path = "../../.." }
13
-tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
14
-serde = { version = "1", features = ["derive"] }
15
-serde_json = "1"
16
-log = "0.4"
13
+tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
14
+serde = { workspace = true, features = ["derive"] }
15
+serde_json = { workspace = true }
16
+log = { workspace = true }
17
18
[target.'cfg(target_os = "android")'.dependencies]
19
jni = "0.21"
uniffi-bindgen/Cargo.toml
+1
-1
@@ -9,4 +9,4 @@ name = "uniffi-bindgen"
9
path = "uniffi-bindgen.rs"
10
11
[dependencies]
12
-uniffi = { version = "=0.31.0", features = ["cli"] }
12
+uniffi = { workspace = true, features = ["cli"] }