You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`@homeofthings/sqlite3` uses [Node-API](https://nodejs.org/api/n-api.html) so prebuilt binaries do not need to be built for specific Node versions. Prebuilt binaries are available for Node-API v3 and v6. Check the [Node-API version matrix](https://nodejs.org/api/n-api.html#node-api-version-matrix) to ensure your Node version supports one of these. Requires Node.js v20.17.0 or later.
39
+
`@homeofthings/sqlite3` uses [Node-API](https://nodejs.org/api/n-api.html) so prebuilt binaries do not need to be built for specific Node versions. Prebuilt binaries are built as NAPI-version-agnostic (`@homeofthings+sqlite3.*.node`) using the `--napi` flag, and work on any Node.js version that supports the NAPI version used at compile time. Requires Node.js v20.17.0 or later.
40
40
41
-
The module uses [`prebuild-install`](https://github.com/prebuild/prebuild-install) to download the prebuilt binary for your platform, if it exists. These binaries are hosted on GitHub Releases. The following targets are currently provided:
41
+
Prebuilt binaries are bundled inside the npm package using [`prebuildify`](https://github.com/prebuild/prebuildify) and loaded at runtime by [`node-gyp-build`](https://github.com/prebuild/node-gyp-build). No separate download step is needed — `npm install` just works. The following targets are currently provided:
42
42
43
43
*`darwin-arm64`
44
44
*`darwin-x64`
45
-
*`linux-arm64`
46
-
*`linux-x64`
47
-
*`linuxmusl-arm64`
48
-
*`linuxmusl-x64`
45
+
*`linux-arm64` (glibc)
46
+
*`linux-x64` (glibc)
47
+
*`linux-arm64` (musl)
48
+
*`linux-x64` (musl)
49
49
*`win32-x64`
50
50
51
-
Unfortunately, [prebuild](https://github.com/prebuild/prebuild/issues/174) cannot differentiate between `armv6` and `armv7`, and instead uses `arm` as the `{arch}`. Until that is fixed, you will still need to install `sqlite3` from [source](#source-install).
52
-
53
51
Support for other platforms and architectures may be added in the future if CI supports building on them.
54
52
55
-
If your environment isn't supported, it'll use `node-gyp` to build SQLite, but you will need to install a C++ compiler and linker.
53
+
If your platform isn't supported, `node-gyp-build` automatically falls back to building from source using `node-gyp`. For custom builds (e.g., SQLCipher, external SQLite), use `--build-from-source`:
If building against an external sqlite3 make sure to have the development headers available. Mac OS X ships with these by default. If you don't have them installed, install the `-dev` package with your package manager, e.g. `apt-get install libsqlite3-dev` for Debian/Ubuntu. Make sure that you have at least `libsqlite3` >= 3.6.
142
144
143
145
Note, if building against homebrew-installed sqlite on OS X you can do:
The default sqlite file header is "SQLite format 3". You can specify a different magic, though this will make standard tools and libraries unable to work with your files.
Copy file name to clipboardExpand all lines: docs/DEVELOP.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,9 @@ This project uses [npm version](https://docs.npmjs.com/cli/v10/commands/npm-vers
22
22
```
23
23
24
24
The CI workflow will automatically:
25
-
- Build binaries for all platforms
26
-
- Upload them as release assets
27
-
- Publish the package to npm
25
+
- Build prebuilt binaries for all platforms
26
+
- Upload them to GitHub Release
27
+
- Publish the package to npm (with bundled prebuilt binaries)
28
28
29
29
3.** Edit the generated Pre-release
30
30
- select "Generate release notes" and adjust them to your needs
@@ -44,12 +44,15 @@ When you push a tag (e.g., `v6.0.2`), the CI workflow will:
44
44
45
45
1. Build prebuilt binaries for:
46
46
- macOS (x64, arm64)
47
-
- Linux (x64, arm64)
48
-
- Windows (x64, ia32)
47
+
- Linux glibc (x64, arm64)
48
+
- Linux musl (x64, arm64)
49
+
- Windows (x64)
49
50
50
51
2. Upload binaries to GitHub Release
51
52
52
-
3. Publish to npm using trusted publishing (no NPM_TOKEN required)
53
+
3. Merge all prebuilt binaries into the npm package and publish to npm
54
+
55
+
On PRs and pushes to main (non-tag), the CI also creates an npm tarball artifact (via `npm pack`) so the package contents can be inspected before publishing.
0 commit comments