Skip to content

Commit f743639

Browse files
committed
Docs.
1 parent 7cb974f commit f743639

File tree

7 files changed

+22
-9
lines changed

7 files changed

+22
-9
lines changed

embed/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,22 @@ The following optional features are compiled in:
1919
- [uint](https://github.com/sqlite/sqlite/blob/master/ext/misc/uint.c)
2020
- [time](../sqlite3/time.c)
2121

22-
See the [configuration options](../sqlite3/sqlite_cfg.h),
22+
See the [configuration options](../sqlite3/sqlite_opt.h),
2323
and [patches](../sqlite3) applied.
2424

2525
Built using [`wasi-sdk`](https://github.com/WebAssembly/wasi-sdk),
2626
and [`binaryen`](https://github.com/WebAssembly/binaryen).
2727

2828
The build is easily reproducible, and verifiable, using
29-
[Artifact Attestations](https://github.com/ncruces/go-sqlite3/attestations).
29+
[Artifact Attestations](https://github.com/ncruces/go-sqlite3/attestations).
30+
31+
### Customizing the build
32+
33+
You can use your own custom build of SQLite.
34+
35+
Examples of custom builds of SQLite are:
36+
- [`github.com/ncruces/go-sqlite3/embed/bcw2`](https://github.com/ncruces/go-sqlite3/tree/main/embed/bcw2)
37+
built from a branch supporting [`BEGIN CONCURRENT`](https://sqlite.org/src/doc/begin-concurrent/doc/begin_concurrent.md)
38+
and [Wal2](https://www.sqlite.org/cgi/src/doc/wal2/doc/wal2.md).
39+
- [`github.com/asg017/sqlite-vec-go-bindings/ncruces`](https://github.com/asg017/sqlite-vec-go-bindings)
40+
which includes the [`sqlite-vec`](https://github.com/asg017/sqlite-vec) vector search extension.

embed/bcw2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Embeddable Wasm build of SQLite
22

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

77
> [!IMPORTANT]

embed/bcw2/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ROOT=../../
77
BINARYEN="$ROOT/tools/binaryen/bin"
88
WASI_SDK="$ROOT/tools/wasi-sdk/bin"
99

10-
trap 'rm -rf build sqlite bcw2.tmp' EXIT
10+
trap 'rm -rf build/ sqlite/ bcw2.tmp' EXIT
1111

1212
mkdir -p build/ext/
1313
cp "$ROOT"/sqlite3/*.[ch] build/

embed/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ ROOT=../
77
BINARYEN="$ROOT/tools/binaryen/bin"
88
WASI_SDK="$ROOT/tools/wasi-sdk/bin"
99

10+
trap 'rm -f sqlite3.tmp' EXIT
11+
1012
"$WASI_SDK/clang" --target=wasm32-wasi -std=c23 -g0 -O2 \
1113
-Wall -Wextra -Wno-unused-parameter -Wno-unused-function \
1214
-o sqlite3.wasm "$ROOT/sqlite3/main.c" \
@@ -23,7 +25,6 @@ WASI_SDK="$ROOT/tools/wasi-sdk/bin"
2325
-DSQLITE_CUSTOM_INCLUDE=sqlite_opt.h \
2426
$(awk '{print "-Wl,--export="$0}' exports.txt)
2527

26-
trap 'rm -f sqlite3.tmp' EXIT
2728
"$BINARYEN/wasm-ctor-eval" -g -c _initialize sqlite3.wasm -o sqlite3.tmp
2829
"$BINARYEN/wasm-opt" -g --strip --strip-producers -c -O3 \
2930
sqlite3.tmp -o sqlite3.wasm \

gormlite/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ require (
1414
github.com/jinzhu/now v1.1.5 // indirect
1515
github.com/ncruces/julianday v1.0.0 // indirect
1616
github.com/tetratelabs/wazero v1.7.3 // indirect
17-
golang.org/x/sys v0.23.0 // indirect
17+
golang.org/x/sys v0.24.0 // indirect
1818
golang.org/x/text v0.17.0 // indirect
1919
)

gormlite/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt
88
github.com/ncruces/julianday v1.0.0/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g=
99
github.com/tetratelabs/wazero v1.7.3 h1:PBH5KVahrt3S2AHgEjKu4u+LlDbbk+nsGE3KLucy6Rw=
1010
github.com/tetratelabs/wazero v1.7.3/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
11-
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
12-
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
11+
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
12+
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
1313
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
1414
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
1515
gorm.io/gorm v1.25.11 h1:/Wfyg1B/je1hnDx3sMkX+gAlxrlZpn6X0BXRlwXlvHg=

util/vtabutil/parse/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ ROOT=../../../
77
BINARYEN="$ROOT/tools/binaryen/bin"
88
WASI_SDK="$ROOT/tools/wasi-sdk/bin"
99

10+
trap 'rm -f sql3parse_table.tmp' EXIT
11+
1012
"$WASI_SDK/clang" --target=wasm32-wasi -std=c23 -g0 -Oz \
1113
-Wall -Wextra -o sql3parse_table.wasm main.c \
1214
-mexec-model=reactor \
@@ -18,7 +20,6 @@ WASI_SDK="$ROOT/tools/wasi-sdk/bin"
1820
-Wl,--import-undefined \
1921
-Wl,--export=sql3parse_table
2022

21-
trap 'rm -f sql3parse_table.tmp' EXIT
2223
"$BINARYEN/wasm-ctor-eval" -c _initialize sql3parse_table.wasm -o sql3parse_table.tmp
2324
"$BINARYEN/wasm-opt" --strip --strip-debug --strip-producers -c -Oz \
2425
sql3parse_table.tmp -o sql3parse_table.wasm \

0 commit comments

Comments
 (0)