@smbcloud / cli / commits / 1bb1f39

Rename auth SDK crates: -py and -wasm suffixes to -sdk-py and -sdk-wasm

- Renamed `crates/smbcloud-auth-py` to `crates/smbcloud-auth-sdk-py` - Renamed `crates/smbcloud-auth-wasm` to `crates/smbcloud-auth-sdk-wasm` - Updated all references in documentation, workflow, and build scripts - Updated crate names and lib names in Cargo.toml files - Updated Python and npm SDK build paths to match new crate names - Updated LICENSE copyright holder to smbCloud (Splitfire AB) - Regenerated Cargo.lock to reflect crate renames

keypair34 committed Apr 12, 2026 at 07:14 UTC 1bb1f399e1b779c3fc3c95574962cd8d3fd9495a
21 files changed +240 -35
.agents/skills/ci-cd/SKILL.md
+2 -2
@@ -196,7 +196,7 @@ Use `actions/upload-artifact@v7` and `actions/download-artifact@v7` consistently
196
197 The workspace root `Cargo.toml` is a **virtual manifest** (no `[package]` section). Running `cargo build` or `cargo publish` from the workspace root without `--package` will either fail or build every workspace member.
198
199 -This workspace includes `smbcloud-auth-py`, a PyO3 `cdylib` that requires Python symbols at link time. Building the full workspace on platforms without a matching Python interpreter causes:
199 +This workspace includes `smbcloud-auth-sdk-py`, a PyO3 `cdylib` that requires Python symbols at link time. Building the full workspace on platforms without a matching Python interpreter causes:
200
201 ```
202 ld: symbol(s) not found for architecture arm64
@@ -590,7 +590,7 @@ The platform package template uses `${node_pkg}` as a shell-style variable. This
590 ## Common mistakes
591
592 **Building the full workspace in release workflows**
593 -Always pass `--package smbcloud-cli` to `cargo build` and `cargo publish`. Omitting it builds `smbcloud-auth-py` (PyO3 cdylib) which fails on platforms without a matching Python interpreter.
593 +Always pass `--package smbcloud-cli` to `cargo build` and `cargo publish`. Omitting it builds `smbcloud-auth-sdk-py` (PyO3 cdylib) which fails on platforms without a matching Python interpreter.
594
595 **`exit 0` in a separate step does not skip the next step**
596 `exit 0` only terminates the current `run` shell. The following step runs regardless. Use `$GITHUB_OUTPUT` + `if:` conditions for inter-step flow control.
.agents/skills/smbcloud-auth/SKILL.md
+3 -3
@@ -10,7 +10,7 @@ Use this skill when work touches any part of the smbCloud auth stack:
10 - `smbcloud-api` Rails auth service
11 - `smbcloud-web-console` Next.js admin UI
12 - `smbcloud-cli/crates/smbcloud-auth` Rust SDK
13 -- `smbcloud-cli/crates/smbcloud-auth-wasm` browser SDK
13 +- `smbcloud-cli/crates/smbcloud-auth-sdk-wasm` browser SDK
14 - Tauri apps such as Rumi Learn Persian and PBJ Komplit
15 - web apps that use `@smbcloud/sdk-auth`
16
@@ -138,7 +138,7 @@ Do not claim email confirmation exists unless the mailer and route are actually
138 The Rust client surface lives in:
139
140 - `smbcloud-cli/crates/smbcloud-auth`
141 -- `smbcloud-cli/crates/smbcloud-auth-wasm`
141 +- `smbcloud-cli/crates/smbcloud-auth-sdk-wasm`
142
143 When changing tenant app auth:
144
@@ -278,7 +278,7 @@ Use the smallest relevant checks.
278 ### Rust SDK
279
280 - `cargo check -p smbcloud-auth`
281 -- `cargo check -p smbcloud-auth-wasm`
281 +- `cargo check -p smbcloud-auth-sdk-wasm`
282
283 ### Tauri apps
284
.agents/skills/smbcloud-deploy-nextjs/SKILL.md
+1 -1
@@ -230,7 +230,7 @@ These messages do not mean git push happened. Confirm behavior from the code pat
230
231 ## Auth and production-only web issues
232
233 -If the Next.js app uses the wasm auth client from `smbcloud-auth-wasm`, production failures that show:
233 +If the Next.js app uses the wasm auth client from `smbcloud-auth-sdk-wasm`, production failures that show:
234
235 - `Network error. Please check your internet connection and try again.`
236
.github/workflows/ci.yml
+207 -5
@@ -1,17 +1,219 @@
1 name: Tests
2
3 -# This workflow run tests for each push
3 +# Runs on every push.
4 +# Covers:
5 +# - All Rust workspace members (fmt, clippy, tests)
6 +# - smbcloud-auth-sdk-wasm (wasm32-unknown-unknown cargo check)
7 +# - sdk/python → maturin wheel build (smbcloud-sdk-auth)
8 +# - sdk/npm → wasm-pack + prepare-package.mjs (@smbcloud/sdk-auth)
9 +# - sdk/gems → rb_sys native-extension compile (smbcloud-auth gem)
10
11 on: push
12
13 env:
14 CLI_CLIENT_SECRET: ${{ secrets.CLI_CLIENT_SECRET }}
15 + CARGO_TERM_COLOR: always
16
17 jobs:
11 - test_branch:
18 + # ── Rust workspace ──────────────────────────────────────────────────────────
19 + test-rust:
20 + name: Rust — fmt / clippy / test (workspace)
21 runs-on: ubuntu-latest
22 steps:
14 - - uses: actions/checkout@v6
15 - - uses: dtolnay/rust-toolchain@stable
23 + - name: Checkout
24 + uses: actions/checkout@v6
25
17 - - run: cargo test --all-features
26 + - name: Read Rust toolchain
27 + shell: bash
28 + run: |
29 + rust_toolchain="$(sed -n 's/^channel = "\(.*\)"/\1/p' rust-toolchain.toml | head -n 1)"
30 + if [ -z "$rust_toolchain" ]; then
31 + echo "Failed to read Rust toolchain from rust-toolchain.toml" >&2
32 + exit 1
33 + fi
34 + echo "RUST_TOOLCHAIN=${rust_toolchain}" >> "$GITHUB_ENV"
35 +
36 + - name: Install toolkit
37 + uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
38 + with:
39 + toolchain: ${{ env.RUST_TOOLCHAIN }}
40 + components: rustfmt, clippy
41 +
42 + - name: Setup Rust cache
43 + uses: Swatinem/rust-cache@v2
44 + with:
45 + key: test-rust
46 +
47 + - name: Check formatting
48 + run: cargo fmt --all -- --check
49 +
50 + # smbcloud-auth-sdk-wasm targets wasm32-unknown-unknown and cannot be
51 + # compiled or tested on the host. It is checked in its own job below.
52 + - name: Clippy — all workspace members (host targets)
53 + run: cargo clippy --workspace --exclude smbcloud-auth-sdk-wasm --tests -- -D warnings
54 +
55 + - name: Test — all workspace members (host targets)
56 + run: cargo test --workspace --exclude smbcloud-auth-sdk-wasm
57 +
58 + # ── WASM crate ──────────────────────────────────────────────────────────────
59 + check-wasm:
60 + name: Rust — smbcloud-auth-sdk-wasm (wasm32-unknown-unknown)
61 + runs-on: ubuntu-latest
62 + steps:
63 + - name: Checkout
64 + uses: actions/checkout@v6
65 +
66 + - name: Read Rust toolchain
67 + shell: bash
68 + run: |
69 + rust_toolchain="$(sed -n 's/^channel = "\(.*\)"/\1/p' rust-toolchain.toml | head -n 1)"
70 + if [ -z "$rust_toolchain" ]; then
71 + echo "Failed to read Rust toolchain from rust-toolchain.toml" >&2
72 + exit 1
73 + fi
74 + echo "RUST_TOOLCHAIN=${rust_toolchain}" >> "$GITHUB_ENV"
75 +
76 + - name: Install toolkit with wasm32 target
77 + uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
78 + with:
79 + toolchain: ${{ env.RUST_TOOLCHAIN }}
80 + targets: wasm32-unknown-unknown
81 +
82 + - name: Setup Rust cache
83 + uses: Swatinem/rust-cache@v2
84 + with:
85 + key: check-wasm
86 +
87 + - name: Check — smbcloud-auth-sdk-wasm
88 + run: cargo check --package smbcloud-auth-sdk-wasm --target wasm32-unknown-unknown
89 +
90 + # ── Python SDK ──────────────────────────────────────────────────────────────
91 + check-python-sdk:
92 + name: SDK — Python wheel (smbcloud-sdk-auth)
93 + runs-on: ubuntu-latest
94 + steps:
95 + - name: Checkout
96 + uses: actions/checkout@v6
97 +
98 + - name: Read Rust toolchain
99 + shell: bash
100 + run: |
101 + rust_toolchain="$(sed -n 's/^channel = "\(.*\)"/\1/p' rust-toolchain.toml | head -n 1)"
102 + if [ -z "$rust_toolchain" ]; then
103 + echo "Failed to read Rust toolchain from rust-toolchain.toml" >&2
104 + exit 1
105 + fi
106 + echo "RUST_TOOLCHAIN=${rust_toolchain}" >> "$GITHUB_ENV"
107 +
108 + - name: Install toolkit
109 + uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
110 + with:
111 + toolchain: ${{ env.RUST_TOOLCHAIN }}
112 +
113 + - name: Setup Rust cache
114 + uses: Swatinem/rust-cache@v2
115 + with:
116 + key: check-python-sdk
117 +
118 + # manylinux: 'off' runs natively on the ubuntu-latest runner without
119 + # spinning up a manylinux container, which is sufficient for a CI check.
120 + # OpenSSL is vendored in the workspace (features = ["vendored"]) so no
121 + # system libssl-dev is required.
122 + - name: Build Python wheel
123 + uses: PyO3/maturin-action@v1
124 + with:
125 + working-directory: sdk/python
126 + manylinux: "off"
127 + args: --release --locked --out dist
128 +
129 + # ── npm / WASM SDK ──────────────────────────────────────────────────────────
130 + check-npm-sdk:
131 + name: SDK — npm / WASM (@smbcloud/sdk-auth)
132 + runs-on: ubuntu-latest
133 + steps:
134 + - name: Checkout
135 + uses: actions/checkout@v6
136 +
137 + - name: Read Rust toolchain
138 + shell: bash
139 + run: |
140 + rust_toolchain="$(sed -n 's/^channel = "\(.*\)"/\1/p' rust-toolchain.toml | head -n 1)"
141 + if [ -z "$rust_toolchain" ]; then
142 + echo "Failed to read Rust toolchain from rust-toolchain.toml" >&2
143 + exit 1
144 + fi
145 + echo "RUST_TOOLCHAIN=${rust_toolchain}" >> "$GITHUB_ENV"
146 +
147 + - name: Install toolkit with wasm32 target
148 + uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
149 + with:
150 + toolchain: ${{ env.RUST_TOOLCHAIN }}
151 + targets: wasm32-unknown-unknown
152 +
153 + - name: Setup Rust cache
154 + uses: Swatinem/rust-cache@v2
155 + with:
156 + key: check-npm-sdk
157 +
158 + # wasm-pack orchestrates the wasm32 build and wasm-bindgen code generation.
159 + - name: Install wasm-pack
160 + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
161 +
162 + - name: Install Node.js
163 + uses: actions/setup-node@v6
164 + with:
165 + node-version-file: .nvmrc
166 +
167 + # prepare-package.mjs runs wasm-pack internally and then assembles the
168 + # dist/ directory — this validates the full npm package pipeline.
169 + - name: Build and prepare package
170 + working-directory: sdk/npm/smbcloud-auth
171 + run: node ./prepare-package.mjs
172 +
173 + # ── Ruby Gem ────────────────────────────────────────────────────────────────
174 + check-ruby-gem:
175 + name: SDK — Ruby gem (smbcloud-auth)
176 + runs-on: ubuntu-latest
177 + steps:
178 + - name: Checkout
179 + uses: actions/checkout@v6
180 +
181 + - name: Read Rust toolchain
182 + shell: bash
183 + run: |
184 + rust_toolchain="$(sed -n 's/^channel = "\(.*\)"/\1/p' rust-toolchain.toml | head -n 1)"
185 + if [ -z "$rust_toolchain" ]; then
186 + echo "Failed to read Rust toolchain from rust-toolchain.toml" >&2
187 + exit 1
188 + fi
189 + echo "RUST_TOOLCHAIN=${rust_toolchain}" >> "$GITHUB_ENV"
190 +
191 + - name: Install toolkit
192 + uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
193 + with:
194 + toolchain: ${{ env.RUST_TOOLCHAIN }}
195 +
196 + # The gem's ext Cargo workspace (sdk/gems/auth) is separate from the main
197 + # workspace and pulls smbcloud-* crates from crates.io. Its transitive
198 + # deps may link against system OpenSSL, so we install libssl-dev to be safe.
199 + - name: Install system dependencies
200 + run: sudo apt-get update -q && sudo apt-get install -y libssl-dev pkg-config
201 +
202 + # Swatinem/rust-cache scoped to the gem's own Cargo workspace so its
203 + # registry deps are cached independently from the main workspace.
204 + - name: Setup Rust cache (gem workspace)
205 + uses: Swatinem/rust-cache@v2
206 + with:
207 + key: check-ruby-gem
208 + workspaces: sdk/gems/auth
209 +
210 + - name: Setup Ruby
211 + uses: ruby/setup-ruby@v1
212 + with:
213 + ruby-version: "3.4.2"
214 + bundler-cache: true
215 + working-directory: sdk/gems/auth
216 +
217 + - name: Compile native extension
218 + working-directory: sdk/gems/auth
219 + run: bundle exec rake compile
Cargo.lock
+14 -14
@@ -2455,36 +2455,36 @@ dependencies = [
2455 ]
2456
2457 [[package]]
2458 -name = "smbcloud-auth-py"
2459 -version = "0.3.35"
2458 +name = "smbcloud-auth-sdk"
2459 +version = "0.3.34"
2460 dependencies = [
2461 - "pyo3",
2462 - "pythonize",
2461 + "base64",
2462 + "reqwest",
2463 "serde",
2464 "serde_json",
2465 - "smbcloud-auth-sdk",
2465 + "sha2 0.10.9",
2466 "smbcloud-model",
2467 "smbcloud-network",
2468 - "tokio",
2468 + "url-builder",
2469 + "uuid",
2470 ]
2471
2472 [[package]]
2472 -name = "smbcloud-auth-sdk"
2473 -version = "0.3.34"
2473 +name = "smbcloud-auth-sdk-py"
2474 +version = "0.3.35"
2475 dependencies = [
2475 - "base64",
2476 - "reqwest",
2476 + "pyo3",
2477 + "pythonize",
2478 "serde",
2479 "serde_json",
2479 - "sha2 0.10.9",
2480 + "smbcloud-auth-sdk",
2481 "smbcloud-model",
2482 "smbcloud-network",
2482 - "url-builder",
2483 - "uuid",
2483 + "tokio",
2484 ]
2485
2486 [[package]]
2487 -name = "smbcloud-auth-wasm"
2487 +name = "smbcloud-auth-sdk-wasm"
2488 version = "0.3.35"
2489 dependencies = [
2490 "serde-wasm-bindgen",
LICENSE
+1 -1
@@ -175,7 +175,7 @@
175 that a file or directory name be given on the same line as the
176 copyright notice for easier identification within third-party archives.
177
178 - Copyright 2026 Splitfire AB
178 + Copyright 2026 smbCloud (Splitfire AB)
179
180 Licensed under the Apache License, Version 2.0 (the "License");
181 you may not use this file except in compliance with the License.
crates/smbcloud-auth-sdk-py/Cargo.toml renamed
+2 -2
@@ -1,5 +1,5 @@
1 [package]
2 -name = "smbcloud-auth-py"
2 +name = "smbcloud-auth-sdk-py"
3 version = "0.3.35"
4 edition = "2024"
5 authors = ["Seto Elkahfi <hej@setoelkahfi.se>"]
@@ -12,7 +12,7 @@ categories = ["api-bindings", "authentication", "development-tools"]
12 readme = "README.md"
13
14 [lib]
15 -name = "smbcloud_auth_py"
15 +name = "smbcloud_auth_sdk_py"
16 crate-type = ["cdylib"]
17
18 [dependencies]
crates/smbcloud-auth-sdk-py/README.md renamed
+1 -1
@@ -1,3 +1,3 @@
1 -# smbcloud-auth-py
1 +# smbcloud-auth-sdk-py
2
3 PyO3 bindings for the smbCloud Auth SDK.
crates/smbcloud-auth-sdk-py/src/lib.rs renamed
crates/smbcloud-auth-sdk-wasm/Cargo.toml renamed
+4 -1
@@ -1,5 +1,5 @@
1 [package]
2 -name = "smbcloud-auth-wasm"
2 +name = "smbcloud-auth-sdk-wasm"
3 version = "0.3.35"
4 edition = "2024"
5 authors = ["Seto Elkahfi <hej@setoelkahfi.se>"]
@@ -18,6 +18,9 @@ categories = [
18 readme = "README.md"
19
20 [lib]
21 +# Pin the lib name so wasm-pack artifact filenames (smbcloud_auth_wasm.js etc.)
22 +# remain stable regardless of the crate/directory rename.
23 +name = "smbcloud_auth_wasm"
24 crate-type = ["cdylib", "rlib"]
25
26 [dependencies]
crates/smbcloud-auth-sdk-wasm/LICENSE renamed
crates/smbcloud-auth-sdk-wasm/README.md renamed
+2 -2
@@ -1,4 +1,4 @@
1 -# smbcloud-auth-wasm
1 +# smbcloud-auth-sdk-wasm
2
3 Wasm bindings for the smbCloud Auth SDK.
4
@@ -28,7 +28,7 @@ import init, {
28 Environment,
29 login_with_client,
30 signup_with_client,
31 -} from "smbcloud-auth-wasm";
31 +} from "smbcloud-auth-sdk-wasm";
32
33 await init();
34
crates/smbcloud-auth-sdk-wasm/src/apple.rs renamed
crates/smbcloud-auth-sdk-wasm/src/lib.rs renamed
crates/smbcloud-auth-sdk-wasm/src/login.rs renamed
crates/smbcloud-auth-sdk-wasm/src/logout.rs renamed
crates/smbcloud-auth-sdk-wasm/src/me.rs renamed
crates/smbcloud-auth-sdk-wasm/src/remove.rs renamed
crates/smbcloud-auth-sdk-wasm/src/signup.rs renamed
sdk/npm/smbcloud-auth/prepare-package.mjs
+2 -2
@@ -4,7 +4,7 @@ import { execFileSync } from "node:child_process";
4
5 const packageDir = resolve(import.meta.dirname);
6 const repoRoot = resolve(packageDir, "../../..");
7 -const crateDir = resolve(repoRoot, "crates/smbcloud-auth-wasm");
7 +const crateDir = resolve(repoRoot, "crates/smbcloud-auth-sdk-wasm");
8 const stageDir = resolve(repoRoot, "target/npm/sdk-auth");
9 const distDir = resolve(packageDir, "dist");
10 const npmPackageJsonPath = resolve(packageDir, "package.json");
@@ -34,7 +34,7 @@ if (crateVersion !== npmVersion) {
34 "Version mismatch for @smbcloud/sdk-auth.",
35 `npm package version: ${npmVersion}`,
36 `Rust crate version: ${crateVersion}`,
37 - "Update sdk/npm/smbcloud-auth/package.json or crates/smbcloud-auth-wasm/Cargo.toml so they match before publishing.",
37 + "Update sdk/npm/smbcloud-auth/package.json or crates/smbcloud-auth-sdk-wasm/Cargo.toml so they match before publishing.",
38 ].join("\n"),
39 );
40 }
sdk/python/pyproject.toml
+1 -1
@@ -31,7 +31,7 @@ Repository = "https://github.com/smbcloudXYZ/smbcloud-cli"
31 Issues = "https://github.com/smbcloudXYZ/smbcloud-cli/issues"
32
33 [tool.maturin]
34 -manifest-path = "../../crates/smbcloud-auth-py/Cargo.toml"
34 +manifest-path = "../../crates/smbcloud-auth-sdk-py/Cargo.toml"
35 bindings = "pyo3"
36 strip = true
37 module-name = "smbcloud_auth._native"