Skip to content

Commit

Permalink
Test latest snapshot.
Browse files Browse the repository at this point in the history
  • Loading branch information
ncruces committed Oct 10, 2024
1 parent e524fb1 commit 368c900
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion embed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ You can use your own custom build of SQLite.
Examples of custom builds of SQLite are:
- [`github.com/ncruces/go-sqlite3/embed/bcw2`](https://github.com/ncruces/go-sqlite3/tree/main/embed/bcw2)
built from a branch supporting [`BEGIN CONCURRENT`](https://sqlite.org/src/doc/begin-concurrent/doc/begin_concurrent.md)
and [Wal2](https://www.sqlite.org/cgi/src/doc/wal2/doc/wal2.md).
and [Wal2](https://sqlite.org/cgi/src/doc/wal2/doc/wal2.md).
- [`github.com/asg017/sqlite-vec-go-bindings/ncruces`](https://github.com/asg017/sqlite-vec-go-bindings)
which includes the [`sqlite-vec`](https://github.com/asg017/sqlite-vec) vector search extension.
2 changes: 1 addition & 1 deletion embed/bcw2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This folder includes an embeddable Wasm build of SQLite 3.46.1, including the experimental
[`BEGIN CONCURRENT`](https://sqlite.org/src/doc/begin-concurrent/doc/begin_concurrent.md) and
[Wal2](https://www.sqlite.org/cgi/src/doc/wal2/doc/wal2.md) patches.
[Wal2](https://sqlite.org/cgi/src/doc/wal2/doc/wal2.md) patches.

> [!IMPORTANT]
> This package is experimental.
Expand Down
2 changes: 1 addition & 1 deletion embed/bcw2/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mkdir -p build/ext/
cp "$ROOT"/sqlite3/*.[ch] build/
cp "$ROOT"/sqlite3/*.patch build/

curl -# https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=bedrock-3.46 | tar xz
curl -# https://sqlite.org/src/tarball/sqlite.tar.gz?r=bedrock-3.46 | tar xz

cd sqlite
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then
Expand Down
11 changes: 10 additions & 1 deletion sqlite3/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@ cd -P -- "$(dirname -- "$0")"

curl -#OL "https://sqlite.org/2024/sqlite-amalgamation-3460100.zip"
unzip -d . sqlite-amalgamation-*.zip
mv sqlite-amalgamation-*/sqlite3* .
mv sqlite-amalgamation-*/sqlite3.c .
mv sqlite-amalgamation-*/sqlite3.h .
mv sqlite-amalgamation-*/sqlite3ext.h .
rm -rf sqlite-amalgamation-*

# To test a snapshot:
# curl -# https://sqlite.org/snapshot/sqlite-snapshot-202410081727.tar.gz | tar xz
# mv sqlite-snapshot-*/sqlite3.c .
# mv sqlite-snapshot-*/sqlite3.h .
# mv sqlite-snapshot-*/sqlite3ext.h .
# rm -rf sqlite-snapshot-*

cat *.patch | patch --no-backup-if-mismatch

mkdir -p ext/
Expand Down

0 comments on commit 368c900

Please sign in to comment.