sqlrite 0.1.7__tar.gz → 0.1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. {sqlrite-0.1.7 → sqlrite-0.1.9}/.github/workflows/release.yml +302 -5
  2. {sqlrite-0.1.7 → sqlrite-0.1.9}/Cargo.lock +5 -5
  3. {sqlrite-0.1.7 → sqlrite-0.1.9}/Cargo.toml +1 -1
  4. {sqlrite-0.1.7 → sqlrite-0.1.9}/PKG-INFO +1 -1
  5. {sqlrite-0.1.7 → sqlrite-0.1.9}/README.md +3 -3
  6. {sqlrite-0.1.7 → sqlrite-0.1.9}/desktop/package.json +1 -1
  7. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/embedding.md +3 -3
  8. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/release-plan.md +4 -3
  9. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/release-secrets.md +76 -45
  10. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/roadmap.md +25 -7
  11. {sqlrite-0.1.7 → sqlrite-0.1.9}/examples/README.md +2 -2
  12. {sqlrite-0.1.7 → sqlrite-0.1.9}/pyproject.toml +1 -1
  13. {sqlrite-0.1.7 → sqlrite-0.1.9}/sdk/go/README.md +1 -1
  14. {sqlrite-0.1.7 → sqlrite-0.1.9}/sdk/python/Cargo.toml +1 -1
  15. {sqlrite-0.1.7 → sqlrite-0.1.9}/.github/workflows/ci.yml +0 -0
  16. {sqlrite-0.1.7 → sqlrite-0.1.9}/.github/workflows/release-pr.yml +0 -0
  17. {sqlrite-0.1.7 → sqlrite-0.1.9}/.github/workflows/rust.yml +0 -0
  18. {sqlrite-0.1.7 → sqlrite-0.1.9}/.gitignore +0 -0
  19. {sqlrite-0.1.7 → sqlrite-0.1.9}/CODE_OF_CONDUCT.md +0 -0
  20. {sqlrite-0.1.7 → sqlrite-0.1.9}/LICENSE +0 -0
  21. {sqlrite-0.1.7 → sqlrite-0.1.9}/MAINTAINERS +0 -0
  22. {sqlrite-0.1.7 → sqlrite-0.1.9}/Makefile +0 -0
  23. {sqlrite-0.1.7 → sqlrite-0.1.9}/desktop/index.html +0 -0
  24. {sqlrite-0.1.7 → sqlrite-0.1.9}/desktop/package-lock.json +0 -0
  25. {sqlrite-0.1.7 → sqlrite-0.1.9}/desktop/src/App.svelte +0 -0
  26. {sqlrite-0.1.7 → sqlrite-0.1.9}/desktop/src/app.css +0 -0
  27. {sqlrite-0.1.7 → sqlrite-0.1.9}/desktop/src/main.ts +0 -0
  28. {sqlrite-0.1.7 → sqlrite-0.1.9}/desktop/src/vite-env.d.ts +0 -0
  29. {sqlrite-0.1.7 → sqlrite-0.1.9}/desktop/svelte.config.js +0 -0
  30. {sqlrite-0.1.7 → sqlrite-0.1.9}/desktop/tsconfig.json +0 -0
  31. {sqlrite-0.1.7 → sqlrite-0.1.9}/desktop/vite.config.ts +0 -0
  32. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/_index.md +0 -0
  33. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/architecture.md +0 -0
  34. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/design-decisions.md +0 -0
  35. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/desktop.md +0 -0
  36. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/file-format.md +0 -0
  37. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/getting-started.md +0 -0
  38. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/pager.md +0 -0
  39. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/smoke-test.md +0 -0
  40. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/sql-engine.md +0 -0
  41. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/storage-model.md +0 -0
  42. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/supported-sql.md +0 -0
  43. {sqlrite-0.1.7 → sqlrite-0.1.9}/docs/usage.md +0 -0
  44. {sqlrite-0.1.7 → sqlrite-0.1.9}/examples/c/Makefile +0 -0
  45. {sqlrite-0.1.7 → sqlrite-0.1.9}/examples/c/hello.c +0 -0
  46. {sqlrite-0.1.7 → sqlrite-0.1.9}/examples/go/go.mod +0 -0
  47. {sqlrite-0.1.7 → sqlrite-0.1.9}/examples/go/hello.go +0 -0
  48. {sqlrite-0.1.7 → sqlrite-0.1.9}/examples/nodejs/hello.mjs +0 -0
  49. {sqlrite-0.1.7 → sqlrite-0.1.9}/examples/python/hello.py +0 -0
  50. {sqlrite-0.1.7 → sqlrite-0.1.9}/examples/rust/quickstart.rs +0 -0
  51. {sqlrite-0.1.7 → sqlrite-0.1.9}/examples/wasm/Makefile +0 -0
  52. {sqlrite-0.1.7 → sqlrite-0.1.9}/examples/wasm/index.html +0 -0
  53. {sqlrite-0.1.7 → sqlrite-0.1.9}/images/SQLRite - Desktop.png +0 -0
  54. {sqlrite-0.1.7 → sqlrite-0.1.9}/images/SQLRite Data Structures.png +0 -0
  55. {sqlrite-0.1.7 → sqlrite-0.1.9}/images/SQLRite Simple SQL Execution High Level Diagram.png +0 -0
  56. {sqlrite-0.1.7 → sqlrite-0.1.9}/images/SQLRite Simple SQL INSERT Execution High Level Diagram (Insert Row).png +0 -0
  57. {sqlrite-0.1.7 → sqlrite-0.1.9}/images/SQLRite Simple SQL INSERT Execution High Level Diagram.png +0 -0
  58. {sqlrite-0.1.7 → sqlrite-0.1.9}/images/SQLRite_logo.png +0 -0
  59. {sqlrite-0.1.7 → sqlrite-0.1.9}/images/architecture.png +0 -0
  60. {sqlrite-0.1.7 → sqlrite-0.1.9}/rust-toolchain.toml +0 -0
  61. {sqlrite-0.1.7 → sqlrite-0.1.9}/samples/AST.delete.example +0 -0
  62. {sqlrite-0.1.7 → sqlrite-0.1.9}/samples/AST.insert.exemple +0 -0
  63. {sqlrite-0.1.7 → sqlrite-0.1.9}/samples/AST.select.example +0 -0
  64. {sqlrite-0.1.7 → sqlrite-0.1.9}/samples/AST.update.example +0 -0
  65. {sqlrite-0.1.7 → sqlrite-0.1.9}/samples/CREATE TABLE sqlrite_schema.sql +0 -0
  66. {sqlrite-0.1.7 → sqlrite-0.1.9}/samples/CREATE_TABLE with duplicate.sql +0 -0
  67. {sqlrite-0.1.7 → sqlrite-0.1.9}/samples/CREATE_TABLE.sql +0 -0
  68. {sqlrite-0.1.7 → sqlrite-0.1.9}/samples/INSERT.sql +0 -0
  69. {sqlrite-0.1.7 → sqlrite-0.1.9}/scripts/bump-version.sh +0 -0
  70. {sqlrite-0.1.7 → sqlrite-0.1.9}/sdk/go/conn.go +0 -0
  71. {sqlrite-0.1.7 → sqlrite-0.1.9}/sdk/go/go.mod +0 -0
  72. {sqlrite-0.1.7 → sqlrite-0.1.9}/sdk/go/rows.go +0 -0
  73. {sqlrite-0.1.7 → sqlrite-0.1.9}/sdk/go/sqlrite.go +0 -0
  74. {sqlrite-0.1.7 → sqlrite-0.1.9}/sdk/go/sqlrite_test.go +0 -0
  75. {sqlrite-0.1.7 → sqlrite-0.1.9}/sdk/go/stmt.go +0 -0
  76. {sqlrite-0.1.7 → sqlrite-0.1.9}/sdk/python/README.md +0 -0
  77. {sqlrite-0.1.7 → sqlrite-0.1.9}/sdk/python/src/lib.rs +0 -0
  78. {sqlrite-0.1.7 → sqlrite-0.1.9}/sdk/python/tests/test_sqlrite.py +0 -0
  79. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/connection.rs +0 -0
  80. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/error.rs +0 -0
  81. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/lib.rs +0 -0
  82. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/main.rs +0 -0
  83. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/meta_command/mod.rs +0 -0
  84. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/repl/mod.rs +0 -0
  85. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/db/database.rs +0 -0
  86. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/db/mod.rs +0 -0
  87. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/db/secondary_index.rs +0 -0
  88. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/db/table.rs +0 -0
  89. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/executor.rs +0 -0
  90. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/mod.rs +0 -0
  91. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/pager/cell.rs +0 -0
  92. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/pager/file.rs +0 -0
  93. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/pager/header.rs +0 -0
  94. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/pager/index_cell.rs +0 -0
  95. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/pager/interior_page.rs +0 -0
  96. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/pager/mod.rs +0 -0
  97. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/pager/overflow.rs +0 -0
  98. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/pager/page.rs +0 -0
  99. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/pager/pager.rs +0 -0
  100. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/pager/table_page.rs +0 -0
  101. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/pager/varint.rs +0 -0
  102. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/pager/wal.rs +0 -0
  103. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/parser/create.rs +0 -0
  104. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/parser/insert.rs +0 -0
  105. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/parser/mod.rs +0 -0
  106. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/parser/select.rs +0 -0
  107. {sqlrite-0.1.7 → sqlrite-0.1.9}/src/sql/tokenizer.rs +0 -0
@@ -8,8 +8,10 @@
8
8
  # Phase 6e adds publish-desktop.
9
9
  # Phase 6f adds build-python-wheels + publish-python.
10
10
  # Phase 6g adds build-nodejs-binaries + publish-nodejs.
11
- # Phases 6h–6i add publish-wasm / publish-go as separate jobs
12
- # to this same file.
11
+ # Phase 6h adds publish-wasm.
12
+ # Phase 6i adds publish-go (no registry — git tag + GitHub Release
13
+ # with the FFI tarballs attached for users who want prebuilt
14
+ # libsqlrite_c alongside `go get`).
13
15
  #
14
16
  # Design doc: docs/release-plan.md.
15
17
  # One-time registry / branch-protection setup: docs/release-secrets.md.
@@ -127,6 +129,8 @@ jobs:
127
129
  "sqlrite-desktop-v$V"
128
130
  "sqlrite-py-v$V"
129
131
  "sqlrite-node-v$V"
132
+ "sqlrite-wasm-v$V"
133
+ "sdk/go/v$V"
130
134
  "v$V"
131
135
  )
132
136
  for tag in "${TAGS[@]}"; do
@@ -918,6 +922,299 @@ jobs:
918
922
  See the umbrella release [v${{ needs.detect.outputs.version }}](../../releases/tag/v${{ needs.detect.outputs.version }}) for the full changelog.
919
923
  generate_release_notes: true
920
924
 
925
+ # ---------------------------------------------------------------------------
926
+ # Step 3h: build the WASM package via wasm-pack and publish to
927
+ # npm as @joaoh82/sqlrite-wasm. (Phase 6h.)
928
+ #
929
+ # Single job — unlike the Python / Node SDKs there's no per-OS
930
+ # binary matrix, because WebAssembly is one universal artifact
931
+ # that runs on any wasm32-capable host (browsers, Deno, modern
932
+ # bundlers). One build, one upload.
933
+ #
934
+ # **Why scoped (`@joaoh82/sqlrite-wasm`) preemptively:** the
935
+ # unscoped `sqlrite-wasm` is currently free on npm but the
936
+ # similarity check that rejected `sqlrite` (vs `sqlite`) might
937
+ # also reject `sqlrite-wasm` (vs `sqlite-wasm` — distance 1).
938
+ # Going scoped from day one matches the Node SDK's
939
+ # `@joaoh82/sqlrite` decision and avoids the rename dance we
940
+ # did in PR #30. Free to revisit if the ecosystem demands an
941
+ # unscoped name.
942
+ #
943
+ # **Build target = `bundler`:** webpack/vite/rollup users get
944
+ # JS modules + .wasm without needing additional config. `web`
945
+ # / `nodejs` / `deno` targets can be added as siblings later
946
+ # if there's demand; one target per package is the simpler
947
+ # MVP shape.
948
+ #
949
+ # `--scope joaoh82` on `wasm-pack build` makes wasm-pack emit
950
+ # an auto-generated package.json with `name: "@joaoh82/sqlrite-wasm"`
951
+ # in the `pkg/` output directory — saves us from managing two
952
+ # package.json files (the auto-generated one and a hand-written
953
+ # override).
954
+ publish-wasm:
955
+ name: Publish WASM package to npm
956
+ needs: [detect, tag-all]
957
+ if: needs.detect.outputs.should_release == 'true'
958
+ runs-on: ubuntu-latest
959
+ environment: release
960
+ permissions:
961
+ # OIDC: required for npm trusted-publisher token exchange.
962
+ # Same flow proven in publish-nodejs after the v0.1.5–0.1.7
963
+ # debugging adventure.
964
+ id-token: write
965
+ contents: write
966
+ steps:
967
+ - uses: actions/checkout@v4
968
+
969
+ - uses: dtolnay/rust-toolchain@stable
970
+ with:
971
+ targets: wasm32-unknown-unknown
972
+
973
+ - uses: Swatinem/rust-cache@v2
974
+ with:
975
+ shared-key: publish-wasm
976
+ workspaces: 'sdk/wasm -> target'
977
+
978
+ # Install wasm-pack — the canonical tool for building +
979
+ # packaging Rust crates as npm-publishable WASM modules.
980
+ # `cargo binstall` would be faster than `cargo install`
981
+ # (downloads a prebuilt binary) but binstall isn't
982
+ # preinstalled on `ubuntu-latest`; the curl|sh installer
983
+ # does the same thing in one step without bootstrapping
984
+ # binstall first.
985
+ - name: Install wasm-pack
986
+ run: |
987
+ curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
988
+
989
+ # See publish-nodejs for the long-form rationale of this
990
+ # whole setup-node + npm-upgrade dance. Short version:
991
+ # NO `registry-url:` (would force token-auth via .npmrc),
992
+ # then explicitly upgrade npm to 11.5+ so trusted
993
+ # publishing is supported.
994
+ - uses: actions/setup-node@v4
995
+ with:
996
+ node-version: '20'
997
+
998
+ - name: Upgrade npm to latest (need 11.5+ for trusted publishing)
999
+ run: npm install -g npm@latest
1000
+
1001
+ # Build the WASM package. `--target bundler` produces
1002
+ # ES modules + .wasm that webpack/vite/rollup can consume
1003
+ # directly. `--scope joaoh82` makes the auto-generated
1004
+ # package.json's name `@joaoh82/sqlrite-wasm`. `--release`
1005
+ # picks up the size-optimized profile from sdk/wasm/
1006
+ # Cargo.toml ([profile.release] opt-level = "z" + LTO).
1007
+ - name: Build WASM package
1008
+ working-directory: sdk/wasm
1009
+ run: |
1010
+ wasm-pack build --release --target bundler --scope joaoh82
1011
+ echo "--- generated pkg/ contents ---"
1012
+ ls -la pkg/
1013
+ echo "--- generated package.json ---"
1014
+ cat pkg/package.json
1015
+ echo "--- WASM binary size ---"
1016
+ ls -la pkg/*.wasm
1017
+
1018
+ # OIDC env diagnostics — same defensive logging that paid
1019
+ # off when publish-nodejs hit the trusted-publisher subject
1020
+ # mismatch in v0.1.7.
1021
+ - name: OIDC env diagnostics
1022
+ working-directory: sdk/wasm/pkg
1023
+ run: |
1024
+ npm --version
1025
+ echo "ACTIONS_ID_TOKEN_REQUEST_URL is set: ${ACTIONS_ID_TOKEN_REQUEST_URL:+yes}${ACTIONS_ID_TOKEN_REQUEST_URL:-NO}"
1026
+ echo "ACTIONS_ID_TOKEN_REQUEST_TOKEN is set: ${ACTIONS_ID_TOKEN_REQUEST_TOKEN:+yes}${ACTIONS_ID_TOKEN_REQUEST_TOKEN:-NO}"
1027
+ npm pack --dry-run
1028
+
1029
+ # Atomic OIDC publish. Same flag combo proven in
1030
+ # publish-nodejs: `--provenance` to trigger OIDC code path,
1031
+ # `--access public` because scoped packages default to
1032
+ # private, `--loglevel verbose` to keep error logs
1033
+ # diagnosable.
1034
+ - name: Publish to npm
1035
+ working-directory: sdk/wasm/pkg
1036
+ run: npm publish --access public --provenance --loglevel verbose
1037
+
1038
+ - name: GitHub Release
1039
+ uses: softprops/action-gh-release@v2
1040
+ with:
1041
+ tag_name: sqlrite-wasm-v${{ needs.detect.outputs.version }}
1042
+ name: WASM v${{ needs.detect.outputs.version }}
1043
+ body: |
1044
+ Published to npm: https://www.npmjs.com/package/@joaoh82/sqlrite-wasm/v/${{ needs.detect.outputs.version }}
1045
+
1046
+ ```bash
1047
+ npm install @joaoh82/sqlrite-wasm@${{ needs.detect.outputs.version }}
1048
+ ```
1049
+
1050
+ ```javascript
1051
+ // Bundler target — works with webpack, vite, rollup, parcel
1052
+ import init, { Database } from '@joaoh82/sqlrite-wasm';
1053
+
1054
+ await init();
1055
+ const db = new Database();
1056
+ db.exec("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)");
1057
+ db.exec("INSERT INTO users (name) VALUES ('alice')");
1058
+ const rows = db.query("SELECT id, name FROM users");
1059
+ // → [{ id: 1, name: 'alice' }]
1060
+ ```
1061
+
1062
+ **What's in the package:**
1063
+ - `sqlrite_wasm_bg.wasm` — the WebAssembly engine binary
1064
+ - `sqlrite_wasm.js` — auto-generated JS glue (wasm-bindgen)
1065
+ - `sqlrite_wasm.d.ts` — TypeScript types
1066
+ - `package.json` — bundler-target metadata
1067
+
1068
+ **Build target:** `bundler` (webpack/vite/rollup-friendly).
1069
+ For `web` / `nodejs` / `deno` targets, build from source via `wasm-pack build sdk/wasm --target <target>`.
1070
+
1071
+ Verify package provenance:
1072
+ ```bash
1073
+ npm audit signatures
1074
+ ```
1075
+
1076
+ See the umbrella release [v${{ needs.detect.outputs.version }}](../../releases/tag/v${{ needs.detect.outputs.version }}) for the full changelog.
1077
+ files: sdk/wasm/pkg/*.wasm
1078
+ generate_release_notes: true
1079
+
1080
+ # ---------------------------------------------------------------------------
1081
+ # Step 3i: publish the Go SDK. (Phase 6i.)
1082
+ #
1083
+ # Go's distribution model is unique among our publish channels:
1084
+ # there's NO central registry. Go modules pull straight from VCS
1085
+ # via tag, and `go get github.com/joaoh82/rust_sqlite/sdk/go@v0.X.Y`
1086
+ # works the moment a `sdk/go/v0.X.Y` tag is on the remote (modulo
1087
+ # ~minutes of cache lag at proxy.golang.org). The tag is created
1088
+ # by `tag-all` upstream of this job — there's nothing to upload.
1089
+ #
1090
+ # **What this job DOES do:** the binding uses cgo against
1091
+ # `libsqlrite_c` (the C FFI from sqlrite-ffi), so end users
1092
+ # need that shared library on their system to run anything.
1093
+ # We pull the per-platform tarballs that publish-ffi already
1094
+ # uploaded to its release and re-attach them to the Go release
1095
+ # page so Go users have a one-stop-shop:
1096
+ #
1097
+ # `go get github.com/joaoh82/rust_sqlite/sdk/go@vX.Y.Z`
1098
+ # download `libsqlrite_c-<platform>.tar.gz` from the same
1099
+ # release page → set CGO_LDFLAGS / CGO_CFLAGS → `go build`.
1100
+ #
1101
+ # **Tag with slashes:** Go's submodule tag convention is
1102
+ # `<subpath>/vX.Y.Z` — for our module path
1103
+ # `github.com/joaoh82/rust_sqlite/sdk/go`, the canonical tag is
1104
+ # `sdk/go/vX.Y.Z` (slashes intact). GitHub Releases handle
1105
+ # slash-bearing tags fine; the URL just URL-encodes them.
1106
+ publish-go:
1107
+ name: Publish Go SDK GitHub Release
1108
+ needs: [detect, tag-all, publish-ffi]
1109
+ if: needs.detect.outputs.should_release == 'true'
1110
+ runs-on: ubuntu-latest
1111
+ permissions:
1112
+ # For softprops/action-gh-release + gh CLI release-download.
1113
+ contents: write
1114
+ steps:
1115
+ - uses: actions/checkout@v4
1116
+ with:
1117
+ # Need full tag history to verify tag-all's `sdk/go/v$V`
1118
+ # is on the remote.
1119
+ fetch-depth: 0
1120
+
1121
+ # Cheap consistency check that tag-all did its job. If this
1122
+ # fires, something's wrong upstream and the human should
1123
+ # know before we cut a confusingly-named GitHub Release.
1124
+ - name: Verify Go module tag exists
1125
+ run: |
1126
+ V="${{ needs.detect.outputs.version }}"
1127
+ TAG="sdk/go/v$V"
1128
+ if ! git rev-parse "$TAG" >/dev/null 2>&1; then
1129
+ echo "::error::Tag $TAG not found — tag-all should have created + pushed it"
1130
+ exit 1
1131
+ fi
1132
+ echo "Tag $TAG exists at $(git rev-parse --short $TAG)"
1133
+
1134
+ # Pull the tarballs publish-ffi already attached to the
1135
+ # sqlrite-ffi-v<V> release. The `gh release download` flow
1136
+ # avoids re-running the whole publish-ffi build matrix just
1137
+ # to get the artifacts here — it's a single API call with
1138
+ # the workflow's auto-injected GITHUB_TOKEN.
1139
+ - name: Download FFI tarballs from this release wave
1140
+ env:
1141
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1142
+ run: |
1143
+ V="${{ needs.detect.outputs.version }}"
1144
+ mkdir -p ffi-tarballs
1145
+ gh release download "sqlrite-ffi-v$V" \
1146
+ --repo joaoh82/rust_sqlite \
1147
+ --dir ffi-tarballs \
1148
+ --pattern '*.tar.gz'
1149
+ echo "--- FFI tarballs downloaded ---"
1150
+ ls -la ffi-tarballs/
1151
+
1152
+ # Cut the Go release page. Tag has slashes — softprops handles
1153
+ # that correctly (URL-encodes the slashes in the resulting
1154
+ # release URL).
1155
+ - name: GitHub Release
1156
+ uses: softprops/action-gh-release@v2
1157
+ with:
1158
+ tag_name: sdk/go/v${{ needs.detect.outputs.version }}
1159
+ name: Go SDK v${{ needs.detect.outputs.version }}
1160
+ body: |
1161
+ ```bash
1162
+ go get github.com/joaoh82/rust_sqlite/sdk/go@v${{ needs.detect.outputs.version }}
1163
+ ```
1164
+
1165
+ ```go
1166
+ package main
1167
+
1168
+ import (
1169
+ "database/sql"
1170
+ "fmt"
1171
+
1172
+ _ "github.com/joaoh82/rust_sqlite/sdk/go" // registers "sqlrite" driver
1173
+ )
1174
+
1175
+ func main() {
1176
+ db, _ := sql.Open("sqlrite", ":memory:")
1177
+ defer db.Close()
1178
+
1179
+ _, _ = db.Exec("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)")
1180
+ _, _ = db.Exec("INSERT INTO users (name) VALUES ('alice')")
1181
+
1182
+ rows, _ := db.Query("SELECT id, name FROM users")
1183
+ defer rows.Close()
1184
+ for rows.Next() {
1185
+ var id int64
1186
+ var name string
1187
+ rows.Scan(&id, &name)
1188
+ fmt.Printf("%d: %s\n", id, name)
1189
+ }
1190
+ }
1191
+ ```
1192
+
1193
+ ## Prebuilt `libsqlrite_c` (cgo dependency)
1194
+
1195
+ The Go binding uses cgo against the `libsqlrite_c` shared library shipped by [`sqlrite-ffi`](https://github.com/joaoh82/rust_sqlite/tree/main/sqlrite-ffi). The tarballs attached below are the same ones from this release wave's [C FFI release](../../releases/tag/sqlrite-ffi-v${{ needs.detect.outputs.version }}) — provided here so Go users have a one-stop-shop:
1196
+
1197
+ - `sqlrite-ffi-v${{ needs.detect.outputs.version }}-linux-x86_64.tar.gz`
1198
+ - `sqlrite-ffi-v${{ needs.detect.outputs.version }}-linux-aarch64.tar.gz`
1199
+ - `sqlrite-ffi-v${{ needs.detect.outputs.version }}-macos-aarch64.tar.gz`
1200
+ - `sqlrite-ffi-v${{ needs.detect.outputs.version }}-windows-x86_64.tar.gz`
1201
+
1202
+ Extract for your platform, then point cgo at it:
1203
+
1204
+ ```bash
1205
+ tar xzf sqlrite-ffi-v${{ needs.detect.outputs.version }}-<platform>.tar.gz
1206
+ export CGO_CFLAGS="-I$(pwd)/sqlrite-ffi-v${{ needs.detect.outputs.version }}-<platform>/include"
1207
+ export CGO_LDFLAGS="-L$(pwd)/sqlrite-ffi-v${{ needs.detect.outputs.version }}-<platform>/lib -lsqlrite_c"
1208
+ export LD_LIBRARY_PATH="$(pwd)/sqlrite-ffi-v${{ needs.detect.outputs.version }}-<platform>/lib"
1209
+ go build ./...
1210
+ ```
1211
+
1212
+ (On macOS use `DYLD_LIBRARY_PATH` instead of `LD_LIBRARY_PATH`. On Windows, place the `.dll` next to your binary or on `%PATH%`.)
1213
+
1214
+ See the umbrella release [v${{ needs.detect.outputs.version }}](../../releases/tag/v${{ needs.detect.outputs.version }}) for the full changelog.
1215
+ files: ffi-tarballs/*.tar.gz
1216
+ generate_release_notes: true
1217
+
921
1218
  # ---------------------------------------------------------------------------
922
1219
  # Step 4: create the umbrella GitHub Release. Runs after all
923
1220
  # publish-* jobs succeed. Uses GitHub's native auto-generated
@@ -926,7 +1223,7 @@ jobs:
926
1223
  # config if we add one later.
927
1224
  finalize:
928
1225
  name: Finalize umbrella release
929
- needs: [detect, publish-crate, publish-ffi, publish-desktop, publish-python, publish-nodejs]
1226
+ needs: [detect, publish-crate, publish-ffi, publish-desktop, publish-python, publish-nodejs, publish-wasm, publish-go]
930
1227
  if: needs.detect.outputs.should_release == 'true'
931
1228
  runs-on: ubuntu-latest
932
1229
  steps:
@@ -949,8 +1246,8 @@ jobs:
949
1246
  - 🖥️ [Desktop](../../releases/tag/sqlrite-desktop-v${{ needs.detect.outputs.version }}) — unsigned installers for Linux (AppImage + deb), macOS (dmg aarch64), Windows (msi)
950
1247
  - 🐍 [Python](../../releases/tag/sqlrite-py-v${{ needs.detect.outputs.version }}) → [PyPI](https://pypi.org/project/sqlrite/${{ needs.detect.outputs.version }}/) — abi3-py38 wheels for Linux x86_64/aarch64, macOS aarch64, Windows x86_64 + sdist
951
1248
  - 🟢 [Node.js](../../releases/tag/sqlrite-node-v${{ needs.detect.outputs.version }}) → [npm](https://www.npmjs.com/package/@joaoh82/sqlrite/v/${{ needs.detect.outputs.version }}) — N-API bindings with prebuilt `.node` binaries for Linux x86_64/aarch64, macOS aarch64, Windows x86_64
952
-
953
- _WASM / Go SDKs land as their publish jobs come online (Phases 6h–6i)._
1249
+ - 🌐 [WASM](../../releases/tag/sqlrite-wasm-v${{ needs.detect.outputs.version }}) → [npm](https://www.npmjs.com/package/@joaoh82/sqlrite-wasm/v/${{ needs.detect.outputs.version }}) — browser/bundler-target WebAssembly build via wasm-pack
1250
+ - 🐹 [Go SDK](../../releases/tag/sdk%2Fgo%2Fv${{ needs.detect.outputs.version }}) `go get github.com/joaoh82/rust_sqlite/sdk/go@v${{ needs.detect.outputs.version }}` — `database/sql` driver via cgo against `libsqlrite_c`
954
1251
 
955
1252
  ---
956
1253
 
@@ -3736,7 +3736,7 @@ dependencies = [
3736
3736
 
3737
3737
  [[package]]
3738
3738
  name = "sqlrite-desktop"
3739
- version = "0.1.7"
3739
+ version = "0.1.9"
3740
3740
  dependencies = [
3741
3741
  "serde",
3742
3742
  "serde_json",
@@ -3748,7 +3748,7 @@ dependencies = [
3748
3748
 
3749
3749
  [[package]]
3750
3750
  name = "sqlrite-engine"
3751
- version = "0.1.7"
3751
+ version = "0.1.9"
3752
3752
  dependencies = [
3753
3753
  "clap",
3754
3754
  "env_logger",
@@ -3763,7 +3763,7 @@ dependencies = [
3763
3763
 
3764
3764
  [[package]]
3765
3765
  name = "sqlrite-ffi"
3766
- version = "0.1.7"
3766
+ version = "0.1.9"
3767
3767
  dependencies = [
3768
3768
  "cbindgen",
3769
3769
  "sqlrite-engine",
@@ -3771,7 +3771,7 @@ dependencies = [
3771
3771
 
3772
3772
  [[package]]
3773
3773
  name = "sqlrite-nodejs"
3774
- version = "0.1.7"
3774
+ version = "0.1.9"
3775
3775
  dependencies = [
3776
3776
  "napi",
3777
3777
  "napi-build",
@@ -3781,7 +3781,7 @@ dependencies = [
3781
3781
 
3782
3782
  [[package]]
3783
3783
  name = "sqlrite-python"
3784
- version = "0.1.7"
3784
+ version = "0.1.9"
3785
3785
  dependencies = [
3786
3786
  "pyo3",
3787
3787
  "sqlrite-engine",
@@ -27,7 +27,7 @@ resolver = "3"
27
27
  # `package =` key so the import name stays `sqlrite` internally:
28
28
  # sqlrite = { package = "sqlrite-engine", path = "…" }
29
29
  name = "sqlrite-engine"
30
- version = "0.1.7"
30
+ version = "0.1.9"
31
31
  authors = ["Joao Henrique Machado Silva <joaoh82@gmail.com>"]
32
32
  edition = "2024"
33
33
  rust-version = "1.85"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlrite
3
- Version: 0.1.7
3
+ Version: 0.1.9
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -224,13 +224,13 @@ Lockstep versioning — one dispatch bumps every product to the same `vX.Y.Z`. T
224
224
 
225
225
  - [x] **6a — Bump script**: `scripts/bump-version.sh` rewrites the version string in ten manifests (7 TOML, 3 JSON) in a single pass; semver-validated, idempotent, cross-platform (BSD + GNU sed). Runnable locally for rehearsing a release: `./scripts/bump-version.sh 0.2.0 && cargo build && git diff`.
226
226
  - [x] **6b — CI**: `.github/workflows/ci.yml` runs on every PR + push to main. Seven parallel jobs: `rust-build-and-test` (Linux/macOS/Windows × cargo build + test), `rust-lint` (fmt + clippy + doc), `python-sdk` (Linux/macOS/Windows × maturin develop + pytest in a venv), `nodejs-sdk` (Linux/macOS/Windows × napi build + node --test), `go-sdk` (Linux/macOS × cargo build sqlrite-ffi + go test), `wasm-build` (wasm-pack + size report), `desktop-build` (npm ci + Tauri Rust compile). Cargo / npm / pip caching for fast PR turnaround.
227
- - [x] **6c — Trusted publisher setup + branch protection runbook**: [`docs/release-secrets.md`](docs/release-secrets.md) captures the one-time web-UI setup — crates.io token in the `release` environment, OIDC trusted publishers on PyPI (`sqlrite`) and npm (`@joaoh82/sqlrite` + `sqlrite-wasm` — Node binding is scoped because npm's similarity check rejects the unscoped name against `sqlite`/`sqlite3`), GitHub `release` environment with required reviewer, branch protection on `main` requiring 14 CI jobs + 1 review. No code changes — executable as-is, ready to run through in the GitHub + registry UIs.
227
+ - [x] **6c — Trusted publisher setup + branch protection runbook**: [`docs/release-secrets.md`](docs/release-secrets.md) captures the one-time web-UI setup — crates.io token in the `release` environment, OIDC trusted publishers on PyPI (`sqlrite`) and npm (`@joaoh82/sqlrite` + `@joaoh82/sqlrite-wasm` — both scoped because npm's similarity check rejects the unscoped names against `sqlite`/`sqlite3`/`sqlite-wasm`), GitHub `release` environment with required reviewer, branch protection on `main` requiring 14 CI jobs + 1 review. No code changes — executable as-is, ready to run through in the GitHub + registry UIs.
228
228
  - [x] **6d — Release PR + skeleton publish**: two workflows under `.github/workflows/`. `release-pr.yml` (manual dispatch with version input → bump-version.sh → PR), `release.yml` (fires on `release: v<semver>` merge commit → `tag-all` + `publish-crate` + `publish-ffi` matrix [linux x86_64/aarch64, macOS aarch64, windows x86_64] + umbrella release). Idempotent tag creation so "Re-run failed jobs" works after partial failures. `cargo publish` gated by the `release` environment's required-reviewer rule. First canary: `v0.1.1`.
229
229
  - [ ] **6e — Desktop publish**: add `publish-desktop` to `release.yml` — Tauri build matrix → unsigned `.AppImage` / `.deb` / `.dmg` / `.msi` → GitHub Release
230
230
  - [ ] **6f — Python SDK publish**: `maturin-action` → abi3 wheels for manylinux x86_64/aarch64 + macOS universal + Windows x86_64 → PyPI via OIDC
231
231
  - [ ] **6g — Node.js SDK publish**: `@napi-rs/cli` → `.node` binaries per platform → npm via OIDC
232
- - [ ] **6h — WASM publish**: `wasm-pack publish` → `sqlrite-wasm` on npm
233
- - [ ] **6i — Go SDK publish**: `sdk/go/vX.Y.Z` git tag + attach FFI tarballs to the Go GitHub Release for `go get` users who want prebuilt `libsqlrite_c`
232
+ - [x] **6h — WASM publish**: `wasm-pack build --target bundler --scope joaoh82` + `npm publish --provenance` (OIDC) `@joaoh82/sqlrite-wasm` on npm. Single job, no matrix (WebAssembly is universal). `.wasm` also attached to the `sqlrite-wasm-v<V>` GitHub Release.
233
+ - [x] **6i — Go SDK publish**: `sdk/go/vX.Y.Z` git tag (Go modules pull straight from VCS, no registry); GitHub Release at that tag with the FFI tarballs from `publish-ffi` re-attached so Go users have a one-stop-shop. `go get github.com/joaoh82/rust_sqlite/sdk/go@vX.Y.Z` works as soon as the tag is pushed.
234
234
 
235
235
  **Phase 6.1 — Code signing** *(follow-up)*
236
236
  - [ ] macOS Apple Developer ID cert → `codesign` + `notarytool` in `tauri-action`
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sqlrite-desktop-frontend",
3
3
  "private": true,
4
- "version": "0.1.7",
4
+ "version": "0.1.9",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -189,7 +189,7 @@ Full API tour: [`sdk/go/README.md`](../sdk/go/README.md); runnable walkthrough:
189
189
  `sdk/wasm/` — `wasm-bindgen` compiles the Rust engine directly to `wasm32-unknown-unknown`. The whole database runs in a browser tab:
190
190
 
191
191
  ```js
192
- import init, { Database } from 'sqlrite-wasm';
192
+ import init, { Database } from '@joaoh82/sqlrite-wasm';
193
193
  await init();
194
194
 
195
195
  const db = new Database();
@@ -201,7 +201,7 @@ const rows = db.query("SELECT id, name FROM users");
201
201
 
202
202
  **In-memory only** in the MVP — file-backed mode needs OS file locks and a `-wal` sidecar that don't exist in a tab's sandbox. OPFS-backed persistence is a natural follow-up.
203
203
 
204
- Build locally via `wasm-pack build --target web --release` (or `bundler` / `nodejs`). Phase 6e publishes `sqlrite-wasm` to npm via `wasm-pack publish` on `v*` tag push.
204
+ Build locally via `wasm-pack build --target web --release` (or `bundler` / `nodejs`). Phase 6h publishes `@joaoh82/sqlrite-wasm` (bundler target) to npm via `wasm-pack build` + `npm publish` (OIDC trusted publisher) on every release.
205
205
 
206
206
  The root engine crate is feature-gated (`cli` for rustyline/clap/env_logger; `file-locks` for fs2) so `default-features = false` strips out everything that wouldn't compile on `wasm32-unknown-unknown`.
207
207
 
@@ -217,7 +217,7 @@ Phase 6 lands GitHub Actions CI + release automation:
217
217
 
218
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::…`)
219
219
  - **PyPI** — `sqlrite` wheels (manylinux x86_64/aarch64, macOS universal, Windows x86_64)
220
- - **npm** — `@joaoh82/sqlrite` (Node) + `sqlrite-wasm` (browser) packages
220
+ - **npm** — `@joaoh82/sqlrite` (Node) + `@joaoh82/sqlrite-wasm` (browser) packages
221
221
  - **Go modules** — `sdk/go/v*` git tags
222
222
  - **GitHub Releases** — Tauri desktop builds + C FFI prebuilt libraries
223
223
 
@@ -75,7 +75,7 @@ GitHub Releases by product ("show me every Python release").
75
75
  | Python SDK | `sqlrite-py-vX.Y.Z` | PyPI + GitHub Release |
76
76
  | Node.js SDK | `sqlrite-node-vX.Y.Z` | npm (`@joaoh82/sqlrite`) + GitHub Release |
77
77
  | Go SDK | `sdk/go/vX.Y.Z` | Git tag (no registry) + GitHub Release assets |
78
- | WASM | `sqlrite-wasm-vX.Y.Z` | npm (`sqlrite-wasm`) + GitHub Release |
78
+ | WASM | `sqlrite-wasm-vX.Y.Z` | npm (`@joaoh82/sqlrite-wasm`) + GitHub Release |
79
79
  | Desktop app | `sqlrite-desktop-vX.Y.Z` | GitHub Release (unsigned installers) |
80
80
  | **Meta** | `vX.Y.Z` | GitHub Release (links to the other seven; acts as the "this was release 0.2.0" anchor) |
81
81
 
@@ -290,8 +290,9 @@ from now.
290
290
  TestPyPI (for dry-runs) if we decide we want that later.
291
291
  3. **npm trusted publishing** — available via npm's newer "OIDC
292
292
  trusted publishing" system. One-time config on npm's web UI
293
- for the `sqlrite` and `sqlrite-wasm` packages. No `NPM_TOKEN`
294
- needed.
293
+ for the `@joaoh82/sqlrite` and `@joaoh82/sqlrite-wasm`
294
+ packages. No `NPM_TOKEN` needed (after a one-time placeholder
295
+ publish per `docs/release-secrets.md` §3a).
295
296
  4. **GitHub Environments** — create one called `release` in repo
296
297
  settings → Environments. Add `joaoh82` as a required reviewer
297
298
  on the `release` environment. The publish jobs reference
@@ -106,54 +106,84 @@ release, status flips to "active".
106
106
  ## 3. npm trusted publishers (two packages)
107
107
 
108
108
  **Why two:** we publish `@joaoh82/sqlrite` (Node.js bindings from
109
- `sdk/nodejs/`) and `sqlrite-wasm` (browser bindings from
109
+ `sdk/nodejs/`) and `@joaoh82/sqlrite-wasm` (browser bindings from
110
110
  `sdk/wasm/`) as separate npm packages. Each needs its own
111
111
  trusted-publisher record.
112
112
 
113
- **Why the scoped name on the Node.js package:** npm's registry
114
- rejects the unscoped `sqlrite` name because of a similarity check
115
- against the existing `sqlite` / `sqlite3` packages (levenshtein
116
- distance 1). Scoping under `@joaoh82` (the author's npm user
117
- scope) bypasses the check cleanly same pattern as `@napi-rs/*`,
118
- `@swc/core`, etc. Discovered during the v0.1.5 canary attempt;
119
- rename PR landed before the retry. Applies to the Node.js
120
- package only; `sqlrite-wasm` may or may not hit the same check
121
- when 6h lands (if it does, rename to `@joaoh82/sqlrite-wasm`).
122
-
123
- ### 3a. Reserve `@joaoh82/sqlrite` on npm
124
-
125
- 1. Log in at <https://www.npmjs.com/> as `joaoh82`.
126
- 2. Scoped packages under your user scope are auto-owned no
127
- manual name reservation step required. First-time publish
128
- against the trusted publisher will create the package.
129
-
130
- ### 3b. Trusted publisher for `@joaoh82/sqlrite`
131
-
132
- npm's trusted publishing flow:
133
-
134
- 1. Go to <https://www.npmjs.com/settings/~/packages> (or your
135
- profile → Packages) → **Trusted Publishers** tab.
136
- 2. **Add a new publisher**:
137
- - **Package name**: `@joaoh82/sqlrite`
113
+ **Why both are scoped:** npm's registry rejects unscoped names
114
+ that are too similar to existing popular packages `sqlrite` is
115
+ levenshtein-distance 1 from `sqlite`/`sqlite3`, and
116
+ `sqlrite-wasm` would be distance 1 from `sqlite-wasm`. Scoping
117
+ under `@joaoh82` (the author's npm user scope) bypasses the
118
+ check entirely same pattern as `@napi-rs/*`, `@swc/core`,
119
+ `@aws-sdk/*`. We learned this the hard way on the Node package
120
+ during the v0.1.5 canary; for the WASM package we went scoped
121
+ preemptively in Phase 6h.
122
+
123
+ ### 3a. Publish a placeholder for each scoped package
124
+
125
+ **npm requires the package to exist before you can configure a
126
+ trusted publisher for it** (no PyPI-style "pending publisher"
127
+ flow as of late 2025). The bootstrap is a one-time manual
128
+ publish of an empty `0.0.0` placeholder using your local
129
+ credentials. Scoped packages under your own user scope are
130
+ auto-owned, so no separate name reservation is needed beyond
131
+ the publish itself.
132
+
133
+ For each of `@joaoh82/sqlrite` and `@joaoh82/sqlrite-wasm`:
134
+
135
+ ```bash
136
+ mkdir /tmp/scoped-placeholder && cd /tmp/scoped-placeholder
137
+ cat > package.json <<'JSON'
138
+ {
139
+ "name": "@joaoh82/sqlrite",
140
+ "version": "0.0.0",
141
+ "description": "Placeholder — real package ships from rust_sqlite CI",
142
+ "license": "MIT"
143
+ }
144
+ JSON
145
+ npm login # if not already
146
+ npm publish --access public
147
+ # Repeat for @joaoh82/sqlrite-wasm — change the name field.
148
+ ```
149
+
150
+ The placeholder is harmless; the first CI release publishes a
151
+ real `0.X.Y` over the top.
152
+
153
+ ### 3b. Trusted publisher for each package
154
+
155
+ For each placeholder you just published:
156
+
157
+ 1. Go to the package's settings page:
158
+ - <https://www.npmjs.com/package/@joaoh82/sqlrite/access>
159
+ - <https://www.npmjs.com/package/@joaoh82/sqlrite-wasm/access>
160
+ 2. Find the **Trusted Publisher** section (under Settings, not
161
+ the package list).
162
+ 3. **Add publisher**:
138
163
  - **Publisher**: GitHub Actions
139
164
  - **Organization or user**: `joaoh82`
140
- - **Repository**: `rust_sqlite`
141
- - **Workflow filename**: `release.yml`
142
- - **Environment**: `release`
143
- 3. Save.
144
-
145
- **npm's chicken-and-egg, resolved for scoped packages:** For
146
- unscoped names (like the abandoned `sqlrite` attempt), npm
147
- requires the package to already exist before you can add a
148
- trusted publisher — first publish needs a temporary `NPM_TOKEN`.
149
- For scoped packages under your own user scope, npm auto-owns
150
- the scope, and the trusted-publisher registration works against
151
- the future package before it exists. First CI publish creates
152
- it cleanly with OIDC. **No temporary token needed.**
153
-
154
- ### 3c. Repeat for `sqlrite-wasm`
155
-
156
- Same steps as 3a + 3b but for the `sqlrite-wasm` package.
165
+ - **Repository**: `rust_sqlite` *(repo basename, not
166
+ `joaoh82/rust_sqlite` npm prepends the owner field)*
167
+ - **Workflow filename**: `release.yml` *(basename, not
168
+ `.github/workflows/release.yml`)*
169
+ - **Environment**: `release` *(case-sensitive — must match the
170
+ `environment: release` block on the publish-* jobs in the
171
+ workflow)*
172
+ 4. Save.
173
+
174
+ **Verify**: each package's settings page should show the
175
+ trusted publisher with status "active" after the first
176
+ successful CI publish.
177
+
178
+ **Why every field matters:** the OIDC subject claim our workflow
179
+ sends to npm is `repo:joaoh82/rust_sqlite:environment:release`.
180
+ npm builds the matcher from the form fields above; if any field
181
+ disagrees with the OIDC claim, npm responds 404 ("OIDC token
182
+ exchange error - package not found"), which is npm's misleading
183
+ way of saying "no trusted publisher record matches your token's
184
+ claims". Burned us once on v0.1.7 (typo'd repo name in the
185
+ form); kept the form field reference here so the next person
186
+ doesn't have to re-debug.
157
187
 
158
188
  ---
159
189
 
@@ -258,8 +288,9 @@ Run through this once everything above is done:
258
288
  `release.yml` / `release` pending for the `sqlrite`
259
289
  project.
260
290
  - [ ] npm trusted-publisher page shows the same for both
261
- `sqlrite` and `sqlrite-wasm` (assuming the packages are
262
- registered — if not, section 3b's bootstrap plan applies).
291
+ `@joaoh82/sqlrite` and `@joaoh82/sqlrite-wasm` (assuming
292
+ the placeholders are published per §3a — if not, section
293
+ 3a applies).
263
294
  - [ ] Branch protection on `main` requires 14 status checks + 1
264
295
  review.
265
296
  - [ ] Open a dummy PR — the "Merge" button is greyed out until
@@ -294,7 +294,7 @@ The Rust library is already shippable — this sub-phase adds crate metadata, do
294
294
  New `sdk/wasm/` crate (standalone, not in the Cargo workspace — wasm-only crates trip `cargo build --workspace` on native hosts). Compiles the Rust engine straight to `wasm32-unknown-unknown` via `wasm-bindgen`. Engine runs entirely in the browser tab.
295
295
 
296
296
  ```js
297
- import init, { Database } from 'sqlrite-wasm';
297
+ import init, { Database } from '@joaoh82/sqlrite-wasm';
298
298
  await init();
299
299
 
300
300
  const db = new Database();
@@ -318,7 +318,7 @@ Landed:
318
318
  - No prepared-statement object at the JS boundary; `db.query(sql)` is one-shot. The engine still does prepare/execute internally.
319
319
  - Parameter binding deferred to 5a.2 (same as every other SDK).
320
320
 
321
- Phase 6e will publish `sqlrite-wasm` to npm via `wasm-pack publish` on `v*` tag push.
321
+ Phase 6h publishes `@joaoh82/sqlrite-wasm` to npm via `wasm-pack build` + `npm publish` (OIDC trusted publisher) on every release.
322
322
 
323
323
  ## Phase 6 — Release engineering + CI/CD
324
324
 
@@ -360,7 +360,7 @@ One-time non-code setup — the state lives in registry web UIs + GitHub setting
360
360
 
361
361
  1. **crates.io API token** → `CRATES_IO_TOKEN` in the `release` environment's secrets (crates.io doesn't support OIDC yet, so this is the only long-lived token in the pipeline).
362
362
  2. **PyPI trusted publisher** pointed at `release.yml` / environment `release` — short-lived OIDC tokens, no secret to leak.
363
- 3. **npm trusted publishers** for both `@joaoh82/sqlrite` (the Node binding scoped because npm rejected the unscoped `sqlrite` name as too similar to `sqlite`/`sqlite3`) and `sqlrite-wasm` (the browser binding). Scoped packages under your own user scope auto-own the name, so the trusted-publisher flow works without a bootstrap `NPM_TOKEN`. See `docs/release-secrets.md` §3 for the full flow.
363
+ 3. **npm trusted publishers** for both `@joaoh82/sqlrite` (the Node binding) and `@joaoh82/sqlrite-wasm` (the browser binding). Both scoped because npm rejected the unscoped `sqlrite` and the WASM stem also risks the same similarity check against `sqlite-wasm`. Scoped packages under your own user scope auto-own the name; npm-side trusted-publisher config still requires the package to exist first (publish a `0.0.0` placeholder via `npm login` + `npm publish --access public` in a temp dir, then add the trusted publisher on the package's settings page). See `docs/release-secrets.md` §3 for the full flow + the gotchas we hit.
364
364
  4. **GitHub `release` environment** — required reviewer (maintainer), `main`-only deployments, scoped secrets. Acts as a second human-in-the-loop gate after the Release PR merge but before any registry write.
365
365
  5. **Branch protection on `main`** — require 14 CI status checks green + 1 review + conversation resolution. Admin bypass left available for emergencies.
366
366
 
@@ -429,13 +429,31 @@ Same build/publish split as publish-python — matrix cells upload `.node` artif
429
429
 
430
430
  Authentication via npm OIDC trusted publishing — zero long-lived `NPM_TOKEN`. One-time trusted-publisher registration on npmjs.com, documented in `docs/release-secrets.md`.
431
431
 
432
- ### Phase 6h — WASM publish
432
+ ### Phase 6h — WASM publish
433
433
 
434
- Adds `publish-wasm` job. `wasm-pack publish` to npm as `sqlrite-wasm`.
434
+ Adds a single `publish-wasm` job to `release.yml` (no per-platform matrix — WebAssembly is one universal artifact). `wasm-pack build --target bundler --scope joaoh82 --release` produces `sdk/wasm/pkg/` containing the `.wasm` binary, JS glue, TypeScript types, and an auto-generated `package.json` with `name: "@joaoh82/sqlrite-wasm"`. `npm publish --access public --provenance` then uploads via the same OIDC trusted-publisher flow as `publish-nodejs`.
435
435
 
436
- ### Phase 6iGo SDK publish
436
+ **Scoped (`@joaoh82/sqlrite-wasm`) preemptively**the unscoped `sqlrite-wasm` is currently free on npm but the similarity check that rejected `sqlrite` (vs `sqlite`) might also reject `sqlrite-wasm` (vs `sqlite-wasm`, distance 1). Going scoped from day one matches the Node SDK and avoids the rename dance we did for it in PR #30.
437
437
 
438
- Adds `publish-go` job. No registry tags `sdk/go/vX.Y.Z`; attaches the FFI tarballs (from `publish-ffi`) to the Go GitHub Release for users who want prebuilt `libsqlrite_c`.
438
+ **Build target = `bundler`** ships JS modules + `.wasm` that webpack/vite/rollup/parcel users can consume directly. `web` / `nodejs` / `deno` targets can be added as siblings later if there's demand; one target per package is the simpler MVP shape.
439
+
440
+ The `.wasm` binary is also attached to the `sqlrite-wasm-vX.Y.Z` GitHub Release for users who want a download link rather than going through npm.
441
+
442
+ `docs/release-secrets.md` §3 now covers both scoped npm packages with the bootstrap-then-add-trusted-publisher flow we settled on after the v0.1.5–v0.1.7 publish-nodejs debugging cycle.
443
+
444
+ ### ✅ Phase 6i — Go SDK publish
445
+
446
+ Adds `publish-go` job. **No registry to publish to** — Go modules pull straight from VCS via tag (`go get …@vX.Y.Z` resolves the moment the tag is on GitHub, modulo proxy.golang.org cache lag). The job's actual work:
447
+
448
+ 1. Verifies `tag-all` pushed `sdk/go/v<V>` (the slash-bearing submodule tag Go modules require for the path `github.com/joaoh82/rust_sqlite/sdk/go`).
449
+ 2. Downloads the per-platform `libsqlrite_c-*.tar.gz` tarballs that `publish-ffi` already uploaded to its release.
450
+ 3. Re-attaches them to a fresh Go GitHub Release at the `sdk/go/v<V>` tag, so Go users have one page with both the `go get` instructions AND the cgo dependency tarballs.
451
+
452
+ The release body documents the cgo wiring (`CGO_CFLAGS` / `CGO_LDFLAGS` / `LD_LIBRARY_PATH` per platform).
453
+
454
+ **Why this can't fail in interesting ways:** no registry auth, no OIDC, no cross-platform build matrix, no npm-similarity-check theater. Just a tag check + a file download + a release create. The big hidden cost was getting the *upstream* (publish-ffi) right months earlier; this job is mostly orchestration on top.
455
+
456
+ With 6i done, **Phase 6 is complete** — every product distribution channel ships on every release with one human action (Release PR review + merge).
439
457
 
440
458
  ### Phase 6.1 — Code signing *(follow-up)*
441
459
 
@@ -11,7 +11,7 @@ Phase 5 lands these incrementally — each sub-phase fills in one language. The
11
11
  | Python | ✅ Phase 5c | PyPI as `sqlrite` (Phase 6f) | [`python/`](python/) |
12
12
  | Node.js | ✅ Phase 5d | npm as `@joaoh82/sqlrite` (Phase 6g) | [`nodejs/`](nodejs/) |
13
13
  | Go | ✅ Phase 5e | Go modules (Phase 6i) | [`go/`](go/) |
14
- | WASM | ✅ Phase 5g | npm as `sqlrite-wasm` (Phase 6h) | [`wasm/`](wasm/) |
14
+ | WASM | ✅ Phase 5g | npm as `@joaoh82/sqlrite-wasm` (Phase 6h) | [`wasm/`](wasm/) |
15
15
 
16
16
  See [docs/roadmap.md](../docs/roadmap.md) for what each sub-phase delivers.
17
17
 
@@ -89,5 +89,5 @@ See [`wasm/index.html`](wasm/index.html) and [`sdk/wasm/README.md`](../sdk/wasm/
89
89
  ## Design notes
90
90
 
91
91
  - **One shape across languages.** Every SDK exposes `Connection`, `prepare`, `execute`, and typed `Row` access. The language-specific file in each subdir shows the same CRUD + transaction walkthrough, so users picking up a new binding recognize the surface immediately.
92
- - **No build step required for end users.** Phase 6 ships prebuilt wheels (Python), `.node` binaries (Node.js), `libsqlrite.{so,dylib,dll}` (for Go / C), and `sqlrite-wasm` (browser) — no "install Rust first" tax.
92
+ - **No build step required for end users.** Phase 6 ships prebuilt wheels (Python), `.node` binaries (Node.js), `libsqlrite.{so,dylib,dll}` (for Go / C), and `@joaoh82/sqlrite-wasm` (browser) — no "install Rust first" tax.
93
93
  - **Examples track the engine.** Each sub-phase's commit lands the example alongside the binding itself, so the sample always works against the current library shape.
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "sqlrite"
7
- version = "0.1.7"
7
+ version = "0.1.9"
8
8
  description = "Python bindings for SQLRite — a small, embeddable SQLite clone written in Rust."
9
9
  authors = [{ name = "Joao Henrique Machado Silva", email = "joaoh82@gmail.com" }]
10
10
  license = { text = "MIT" }
@@ -24,7 +24,7 @@ cargo build --release -p sqlrite-ffi # produces target/release/libsqlrite_c.{s
24
24
  go get github.com/joaoh82/rust_sqlite/sdk/go
25
25
  ```
26
26
 
27
- Phase 6e will publish prebuilt `libsqlrite_c` binaries as GitHub Release assets so end users consuming the Go module don't need the Rust toolchain.
27
+ Phase 6i ships prebuilt `libsqlrite_c` tarballs as GitHub Release assets on every release, so end users consuming the Go module don't need the Rust toolchain. Each release at `sdk/go/v<V>` includes per-platform tarballs (Linux x86_64/aarch64, macOS aarch64, Windows x86_64) you can extract and point cgo at via `CGO_CFLAGS` / `CGO_LDFLAGS`.
28
28
 
29
29
  ## Quick tour
30
30
 
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sqlrite-python"
3
- version = "0.1.7"
3
+ version = "0.1.9"
4
4
  authors = ["Joao Henrique Machado Silva <joaoh82@gmail.com>"]
5
5
  edition = "2024"
6
6
  rust-version = "1.85"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes