Fix uuid randomness on wasm32 and update runner signature
- Add uuid with js feature for wasm32 in smbcloud-auth-sdk-wasm - Change Runner::from to accept &Path instead of &PathBuf - Bump npm sdk-auth package to 0.3.35
keypair34 committed
Apr 12, 2026 at 07:44 UTC
205edf1059e092bff49b676885426eb51d4956ed
4 files changed
+10
-3
Cargo.lock
+1
@@ -2491,6 +2491,7 @@ dependencies = [
2491
"smbcloud-auth-sdk",
2492
"smbcloud-network",
2493
"smbcloud-networking",
2494
+ "uuid",
2495
"wasm-bindgen",
2496
"wasm-bindgen-futures",
2497
]
crates/smbcloud-auth-sdk-wasm/Cargo.toml
+6
@@ -30,3 +30,9 @@ smbcloud-networking = { workspace = true }
30
smbcloud-auth-sdk = { workspace = true }
31
wasm-bindgen = { workspace = true }
32
wasm-bindgen-futures = "0.4.50"
33
+
34
+# uuid's v4 feature needs a randomness source on wasm32-unknown-unknown.
35
+# The `js` feature wires it to the Web Crypto API (crypto.getRandomValues).
36
+# This only activates when building for wasm32 targets.
37
+[target.'cfg(target_arch = "wasm32")'.dependencies]
38
+uuid = { version = "1", features = ["js"] }
crates/smbcloud-model/src/runner.rs
+2
-2
@@ -4,7 +4,7 @@ use {
4
serde_repr::{Deserialize_repr, Serialize_repr},
5
std::{
6
fmt::{self, Display, Formatter},
7
- path::PathBuf,
7
+ path::Path,
8
},
9
};
10
@@ -54,7 +54,7 @@ pub enum SwiftFramework {
54
}
55
56
impl Runner {
57
- pub fn from(repo_path: &PathBuf) -> Result<Runner, ErrorResponse> {
57
+ pub fn from(repo_path: &Path) -> Result<Runner, ErrorResponse> {
58
// Any package.json-driven app belongs on the NodeJs runner.
59
// Framework-specific checks are not reliable because modern Next.js apps
60
// do not need a next.config.* file at all.
sdk/npm/smbcloud-auth/package.json
+1
-1
@@ -1,7 +1,7 @@
1
{
2
"name": "@smbcloud/sdk-auth",
3
"description": "Browser Auth SDK for smbCloud, built from Rust and WebAssembly.",
4
- "version": "0.3.34",
4
+ "version": "0.3.35",
5
"type": "module",
6
"main": "dist/smbcloud_auth_wasm.js",
7
"module": "dist/smbcloud_auth_wasm.js",