Skip to content

Commit ee72ddb

Browse files
joaoh82claude
andauthored
Rename crate to sqlrite-engine on crates.io (lib name unchanged) (#17)
The `sqlrite` crate name on crates.io was already taken by an unrelated project (RAG-oriented SQLite wrapper), which made the v0.1.1 canary's `cargo publish` step fail with a 403. Rename the published package to `sqlrite-engine`, keep the [lib] name and [[bin]] name as `sqlrite` so downstream Rust code continues to write `use sqlrite::…` with no change. Workspace members depend on the engine via: sqlrite = { package = "sqlrite-engine", path = "…" } which keeps the import alias stable across the FFI shim, the Python / Node.js / WASM SDKs, and the Tauri desktop app. Also updates release.yml — `cargo publish -p sqlrite-engine`, the per-release body's crates.io URL + TOML snippet, and the umbrella release body's crates.io link — plus docs (release-plan, roadmap, embedding) to match. Per the never-reuse-a-tag policy, tags sqlrite-v0.1.1 / sqlrite-ffi-v0.1.1 / v0.1.1 (created during the failed canary) stay on main; the retry canary cuts v0.1.2. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a0908c2 commit ee72ddb

12 files changed

Lines changed: 83 additions & 41 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,24 +152,31 @@ jobs:
152152
run: |
153153
# `--no-verify` skips the rebuild+test that publish does
154154
# by default — CI already ran on the same commit on the
155-
# Release PR, so re-running here is duplicate work. Also
156-
# `-p sqlrite` is explicit about which workspace member
157-
# we're publishing (could be omitted since sqlrite is the
158-
# root package, but being explicit protects against
159-
# future layout changes).
160-
cargo publish -p sqlrite --no-verify
155+
# Release PR, so re-running here is duplicate work.
156+
#
157+
# Package name on crates.io is `sqlrite-engine`, not
158+
# `sqlrite` — the latter was taken by an unrelated project
159+
# (see root Cargo.toml for context). The [lib] name is
160+
# still `sqlrite`, so downstream code writes `use sqlrite::…`.
161+
cargo publish -p sqlrite-engine --no-verify
161162
162163
- name: GitHub Release
163164
uses: softprops/action-gh-release@v2
164165
with:
165166
tag_name: sqlrite-v${{ needs.detect.outputs.version }}
166167
name: Rust engine v${{ needs.detect.outputs.version }}
167168
body: |
168-
Published to crates.io: https://crates.io/crates/sqlrite/${{ needs.detect.outputs.version }}
169+
Published to crates.io: https://crates.io/crates/sqlrite-engine/${{ needs.detect.outputs.version }}
169170
170171
```toml
171172
[dependencies]
172-
sqlrite = "${{ needs.detect.outputs.version }}"
173+
sqlrite-engine = "${{ needs.detect.outputs.version }}"
174+
```
175+
176+
```rust
177+
// The [lib] name stays `sqlrite`, so the import alias is
178+
// the short one even though the package name is longer.
179+
use sqlrite::{Database, ExecutionResult};
173180
```
174181
175182
See the umbrella release [v${{ needs.detect.outputs.version }}](../../releases/tag/v${{ needs.detect.outputs.version }}) for the full changelog.
@@ -295,7 +302,7 @@ jobs:
295302
296303
Per-product releases in this wave:
297304
298-
- 🦀 [Rust engine](../../releases/tag/sqlrite-v${{ needs.detect.outputs.version }}) → [crates.io](https://crates.io/crates/sqlrite/${{ needs.detect.outputs.version }})
305+
- 🦀 [Rust engine](../../releases/tag/sqlrite-v${{ needs.detect.outputs.version }}) → [crates.io](https://crates.io/crates/sqlrite-engine/${{ needs.detect.outputs.version }})
299306
- 🔧 [C FFI](../../releases/tag/sqlrite-ffi-v${{ needs.detect.outputs.version }}) — prebuilt `libsqlrite_c` for Linux x86_64/aarch64, macOS aarch64, Windows x86_64
300307
301308
_Python / Node.js / WASM / Go / desktop SDKs land as their publish jobs come online (Phases 6e–6i)._

Cargo.lock

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

Cargo.toml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,25 @@ members = [".", "desktop/src-tauri", "sqlrite-ffi", "sdk/python", "sdk/nodejs"]
1313
resolver = "3"
1414

1515
[package]
16-
name = "sqlrite"
16+
# Published to crates.io as `sqlrite-engine` because `sqlrite` was
17+
# already taken (unrelated project — RAG-oriented SQLite wrapper). The
18+
# lib target below keeps `name = "sqlrite"`, so downstream Rust code
19+
# still writes `use sqlrite::…` — only the `cargo add` line and the
20+
# dependency declaration change:
21+
#
22+
# [dependencies]
23+
# sqlrite-engine = "0.1"
24+
# # then in code: use sqlrite::{Database, …};
25+
#
26+
# Any workspace member here that depends on the engine uses the
27+
# `package =` key so the import name stays `sqlrite` internally:
28+
# sqlrite = { package = "sqlrite-engine", path = "…" }
29+
name = "sqlrite-engine"
1730
version = "0.1.1"
1831
authors = ["Joao Henrique Machado Silva <joaoh82@gmail.com>"]
1932
edition = "2024"
2033
rust-version = "1.85"
21-
description = "Light version of SQLite developed with Rust"
34+
description = "Light version of SQLite developed with Rust. Published as `sqlrite-engine` on crates.io; import as `use sqlrite::…`."
2235
repository = "https://github.com/joaoh82/rust_sqlite"
2336
license = "MIT"
2437

desktop/src-tauri/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ tauri-build = { version = "2", features = [] }
2121
[dependencies]
2222
# Engine lives at the workspace root; reference it by path. Version
2323
# pinning can wait for a proper release cut.
24-
sqlrite = { path = "../.." }
24+
# `package = "sqlrite-engine"` — crates.io name — with an import alias
25+
# of `sqlrite` so Tauri command code can keep saying `use sqlrite::…`.
26+
sqlrite = { package = "sqlrite-engine", path = "../.." }
2527

2628
tauri = { version = "2", features = [] }
2729
# Tauri 2 plugins must be opted into explicitly; the dialog plugin

docs/embedding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ A fix in the Rust engine propagates through one wrapper update per language rath
215215

216216
Phase 6 lands GitHub Actions CI + release automation:
217217

218-
- **crates.io**`sqlrite` crate
218+
- **crates.io**`sqlrite-engine` crate (published under a different name from the `sqlrite` lib target because the short name was already taken; users `cargo add sqlrite-engine` but still write `use sqlrite::…`)
219219
- **PyPI**`sqlrite` wheels (manylinux x86_64/aarch64, macOS universal, Windows x86_64)
220220
- **npm**`sqlrite` (Node) + `sqlrite-wasm` (browser) packages
221221
- **Go modules**`sdk/go/v*` git tags

docs/release-plan.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,12 @@ The "publish" half. Auto-fires on the release commit.
208208
them. Runs *before* the publish jobs — if a tag already exists
209209
(accidental re-run, cosmic ray), the whole workflow aborts
210210
cleanly.
211-
- **publish-crate**`cargo publish` the root crate to crates.io.
212-
Creates GitHub Release `sqlrite-vX.Y.Z`.
211+
- **publish-crate**`cargo publish -p sqlrite-engine` the root
212+
crate to crates.io. (The crates.io name is `sqlrite-engine`, not
213+
`sqlrite`, because the short name was already taken by an
214+
unrelated project; the `[lib] name = "sqlrite"` keeps `use
215+
sqlrite::…` valid at import sites.) Creates GitHub Release
216+
`sqlrite-vX.Y.Z`.
213217
- **publish-ffi** — matrix build of `libsqlrite_c` for
214218
`{linux-x86_64, linux-aarch64, macos-universal, windows-x86_64}`.
215219
Packages each as a tarball containing the `.so`/`.dylib`/`.dll`,

docs/roadmap.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,15 @@ Jobs wired up in Phase 6d:
387387

388388
1. **detect** — parse version from commit message or dispatch input. Outputs `version` + `should_release`.
389389
2. **tag-all** — idempotent: creates `sqlrite-vX.Y.Z`, `sqlrite-ffi-vX.Y.Z`, and umbrella `vX.Y.Z`; skips any tag that already exists so "Re-run failed jobs" works cleanly after a partial-failure scenario.
390-
3. **publish-crate**`cargo publish -p sqlrite --no-verify` using `CRATES_IO_TOKEN` from the `release` environment (required-reviewer gate applies). Creates the per-product GitHub Release `sqlrite-vX.Y.Z`.
390+
3. **publish-crate**`cargo publish -p sqlrite-engine --no-verify` using `CRATES_IO_TOKEN` from the `release` environment (required-reviewer gate applies). Creates the per-product GitHub Release `sqlrite-vX.Y.Z`. The crates.io name is `sqlrite-engine` because the short `sqlrite` name was taken by an unrelated project; the `[lib] name = "sqlrite"` preserves `use sqlrite::…` at the import site.
391391
4. **publish-ffi** — matrix build of `libsqlrite_c` on Linux x86_64 (`ubuntu-latest`), Linux aarch64 (`ubuntu-24.04-arm`), macOS aarch64 (`macos-latest`), Windows x86_64 (`windows-latest`). Packages the cdylib + staticlib + `sqlrite.h` + README stub into a tarball, uploads to the `sqlrite-ffi-vX.Y.Z` GitHub Release. macOS universal (x86_64 + aarch64 lipo'd together) is a follow-up — MVP ships aarch64-only for Mac; add `macos-13` to the matrix if x86 demand materializes.
392392
5. **finalize** — creates the umbrella `vX.Y.Z` GitHub Release with GitHub's native auto-generated notes (`generate_release_notes: true`). Body links to every per-product release from this wave.
393393

394394
Products whose publish jobs land in later phases (desktop, Python, Node.js, WASM, Go) aren't tagged yet — `tag-all` only creates tags for products that have an active publish job. Cleaner than creating empty releases for products we can't actually ship.
395395

396-
**Verification path**: push this branch → merge → dispatch `release-pr.yml` with version `0.1.1` → review the auto-opened PR → merge → approve the `release` environment prompt → watch crates.io show `sqlrite 0.1.1` + Release page show two per-product releases + umbrella release. Once that works end-to-end, 6e lands the desktop publish, and we bump to `v0.1.2` for the next canary.
396+
**Verification path**: push this branch → merge → dispatch `release-pr.yml` with version `0.1.1` → review the auto-opened PR → merge → approve the `release` environment prompt → watch crates.io show `sqlrite-engine 0.1.1` + Release page show two per-product releases + umbrella release. Once that works end-to-end, 6e lands the desktop publish, and we bump to `v0.1.2` for the next canary.
397+
398+
> **v0.1.1 canary retrospective** *(2026-04-22)* — first publish attempt failed on `cargo publish` with a 403 because the `sqlrite` crate name on crates.io is owned by an unrelated RAG-SQLite project. Renamed the package to `sqlrite-engine` (lib / bin names unchanged, so `use sqlrite::…` still works for consumers). Tags `sqlrite-v0.1.1` / `sqlrite-ffi-v0.1.1` / `v0.1.1` stay on main per the never-reuse-a-tag policy; the next canary cuts `v0.1.2` under the new crate name.
397399
398400
### Phase 6e — Desktop publish
399401

sdk/nodejs/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ crate-type = ["cdylib", "rlib"]
2222
path = "src/lib.rs"
2323

2424
[dependencies]
25-
sqlrite = { path = "../.." }
25+
# `package = "sqlrite-engine"` — crates.io name — with an import alias
26+
# of `sqlrite` so src/ code can keep saying `use sqlrite::…`. See root
27+
# Cargo.toml for the full story on why the package name differs from
28+
# the lib name.
29+
sqlrite = { package = "sqlrite-engine", path = "../.." }
2630

2731
# napi-rs 2.x — mature + widely deployed (used by prisma, swc,
2832
# lightningcss, etc.). Version 2.16 adds `serde-json` features we

sdk/python/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ crate-type = ["cdylib", "rlib"]
2323
path = "src/lib.rs"
2424

2525
[dependencies]
26-
sqlrite = { path = "../.." }
26+
# `package = "sqlrite-engine"` — crates.io name — with an import alias
27+
# of `sqlrite` so src/ code can keep saying `use sqlrite::…`. See root
28+
# Cargo.toml for the full story on why the package name differs from
29+
# the lib name.
30+
sqlrite = { package = "sqlrite-engine", path = "../.." }
2731

2832
# PyO3 with the `abi3-py38` feature so one wheel works on every
2933
# CPython 3.8+ release — no per-Python-version rebuild.

sdk/wasm/Cargo.lock

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

0 commit comments

Comments
 (0)