Skip to content

Commit 1bb1f39

Browse files
committed
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
1 parent b1d4359 commit 1bb1f39

21 files changed

Lines changed: 240 additions & 35 deletions

File tree

.agents/skills/ci-cd/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Use `actions/upload-artifact@v7` and `actions/download-artifact@v7` consistently
196196

197197
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.
198198

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:
200200

201201
```
202202
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
590590
## Common mistakes
591591

592592
**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.
594594

595595
**`exit 0` in a separate step does not skip the next step**
596596
`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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Use this skill when work touches any part of the smbCloud auth stack:
1010
- `smbcloud-api` Rails auth service
1111
- `smbcloud-web-console` Next.js admin UI
1212
- `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
1414
- Tauri apps such as Rumi Learn Persian and PBJ Komplit
1515
- web apps that use `@smbcloud/sdk-auth`
1616

@@ -138,7 +138,7 @@ Do not claim email confirmation exists unless the mailer and route are actually
138138
The Rust client surface lives in:
139139

140140
- `smbcloud-cli/crates/smbcloud-auth`
141-
- `smbcloud-cli/crates/smbcloud-auth-wasm`
141+
- `smbcloud-cli/crates/smbcloud-auth-sdk-wasm`
142142

143143
When changing tenant app auth:
144144

@@ -278,7 +278,7 @@ Use the smallest relevant checks.
278278
### Rust SDK
279279

280280
- `cargo check -p smbcloud-auth`
281-
- `cargo check -p smbcloud-auth-wasm`
281+
- `cargo check -p smbcloud-auth-sdk-wasm`
282282

283283
### Tauri apps
284284

.agents/skills/smbcloud-deploy-nextjs/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ These messages do not mean git push happened. Confirm behavior from the code pat
230230

231231
## Auth and production-only web issues
232232

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:
234234

235235
- `Network error. Please check your internet connection and try again.`
236236

.github/workflows/ci.yml

Lines changed: 207 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,219 @@
11
name: Tests
22

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)
410

511
on: push
612

713
env:
814
CLI_CLIENT_SECRET: ${{ secrets.CLI_CLIENT_SECRET }}
15+
CARGO_TERM_COLOR: always
916

1017
jobs:
11-
test_branch:
18+
# ── Rust workspace ──────────────────────────────────────────────────────────
19+
test-rust:
20+
name: Rust — fmt / clippy / test (workspace)
1221
runs-on: ubuntu-latest
1322
steps:
14-
- uses: actions/checkout@v6
15-
- uses: dtolnay/rust-toolchain@stable
23+
- name: Checkout
24+
uses: actions/checkout@v6
1625

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

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
that a file or directory name be given on the same line as the
176176
copyright notice for easier identification within third-party archives.
177177

178-
Copyright 2026 Splitfire AB
178+
Copyright 2026 smbCloud (Splitfire AB)
179179

180180
Licensed under the Apache License, Version 2.0 (the "License");
181181
you may not use this file except in compliance with the License.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "smbcloud-auth-py"
2+
name = "smbcloud-auth-sdk-py"
33
version = "0.3.35"
44
edition = "2024"
55
authors = ["Seto Elkahfi <hej@setoelkahfi.se>"]
@@ -12,7 +12,7 @@ categories = ["api-bindings", "authentication", "development-tools"]
1212
readme = "README.md"
1313

1414
[lib]
15-
name = "smbcloud_auth_py"
15+
name = "smbcloud_auth_sdk_py"
1616
crate-type = ["cdylib"]
1717

1818
[dependencies]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# smbcloud-auth-py
1+
# smbcloud-auth-sdk-py
22

33
PyO3 bindings for the smbCloud Auth SDK.
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "smbcloud-auth-wasm"
2+
name = "smbcloud-auth-sdk-wasm"
33
version = "0.3.35"
44
edition = "2024"
55
authors = ["Seto Elkahfi <hej@setoelkahfi.se>"]
@@ -18,6 +18,9 @@ categories = [
1818
readme = "README.md"
1919

2020
[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"
2124
crate-type = ["cdylib", "rlib"]
2225

2326
[dependencies]

0 commit comments

Comments
 (0)