diff options
| author | 2024-08-15 00:30:58 +0000 | |
|---|---|---|
| committer | 2024-08-15 00:30:58 +0000 | |
| commit | 586639ccf0e2fefbd1da2c59d5abcb8d64d37434 (patch) | |
| tree | 52a9d7412e98ef406c39f09a6fad6e3fa7a7ad49 /vendor/github.com/ncruces/go-sqlite3/embed | |
| parent | update go-ffmpreg to v0.2.5 (pulls in latest tetratelabs/wazero) (#3203) (diff) | |
| download | gotosocial-586639ccf0e2fefbd1da2c59d5abcb8d64d37434.tar.xz | |
update go-sqlite3 to v0.18.0 (#3204)
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/embed')
| -rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/embed/README.md | 18 | ||||
| -rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/embed/build.sh | 13 | ||||
| -rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/embed/exports.txt | 8 | ||||
| -rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/embed/sqlite3.wasm | bin | 1364101 -> 1355214 bytes | 
4 files changed, 28 insertions, 11 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/embed/README.md b/vendor/github.com/ncruces/go-sqlite3/embed/README.md index 0156f0176..fc56933b7 100644 --- a/vendor/github.com/ncruces/go-sqlite3/embed/README.md +++ b/vendor/github.com/ncruces/go-sqlite3/embed/README.md @@ -1,6 +1,6 @@  # Embeddable Wasm build of SQLite -This folder includes an embeddable Wasm build of SQLite 3.46.0 for use with +This folder includes an embeddable Wasm build of SQLite 3.46.1 for use with  [`github.com/ncruces/go-sqlite3`](https://pkg.go.dev/github.com/ncruces/go-sqlite3).  The following optional features are compiled in: @@ -17,14 +17,24 @@ The following optional features are compiled in:  - [regexp](https://github.com/sqlite/sqlite/blob/master/ext/misc/regexp.c)  - [series](https://github.com/sqlite/sqlite/blob/master/ext/misc/series.c)  - [uint](https://github.com/sqlite/sqlite/blob/master/ext/misc/uint.c) -- [uuid](https://github.com/sqlite/sqlite/blob/master/ext/misc/uuid.c)  - [time](../sqlite3/time.c) -See the [configuration options](../sqlite3/sqlite_cfg.h), +See the [configuration options](../sqlite3/sqlite_opt.h),  and [patches](../sqlite3) applied.  Built using [`wasi-sdk`](https://github.com/WebAssembly/wasi-sdk),  and [`binaryen`](https://github.com/WebAssembly/binaryen).  The build is easily reproducible, and verifiable, using -[Artifact Attestations](https://github.com/ncruces/go-sqlite3/attestations).
\ No newline at end of file +[Artifact Attestations](https://github.com/ncruces/go-sqlite3/attestations). + +### Customizing the build + +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). +- [`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.
\ No newline at end of file diff --git a/vendor/github.com/ncruces/go-sqlite3/embed/build.sh b/vendor/github.com/ncruces/go-sqlite3/embed/build.sh index 8ea380e26..6141efd57 100644 --- a/vendor/github.com/ncruces/go-sqlite3/embed/build.sh +++ b/vendor/github.com/ncruces/go-sqlite3/embed/build.sh @@ -4,26 +4,27 @@ set -euo pipefail  cd -P -- "$(dirname -- "$0")"  ROOT=../ -BINARYEN="$ROOT/tools/binaryen-version_117/bin" -WASI_SDK="$ROOT/tools/wasi-sdk-22.0/bin" +BINARYEN="$ROOT/tools/binaryen/bin" +WASI_SDK="$ROOT/tools/wasi-sdk/bin" -"$WASI_SDK/clang" --target=wasm32-wasi -std=c23 -flto -g0 -O2 \ +trap 'rm -f sqlite3.tmp' EXIT + +"$WASI_SDK/clang" --target=wasm32-wasi -std=c23 -g0 -O2 \  	-Wall -Wextra -Wno-unused-parameter -Wno-unused-function \  	-o sqlite3.wasm "$ROOT/sqlite3/main.c" \  	-I"$ROOT/sqlite3" \  	-mexec-model=reactor \ -	-msimd128 -mmutable-globals \ +	-matomics -msimd128 -mmutable-globals \  	-mbulk-memory -mreference-types \  	-mnontrapping-fptoint -msign-ext \  	-fno-stack-protector -fno-stack-clash-protection \ -	-Wl,--initial-memory=327680 \  	-Wl,--stack-first \  	-Wl,--import-undefined \ +	-Wl,--initial-memory=327680 \  	-D_HAVE_SQLITE_CONFIG_H \  	-DSQLITE_CUSTOM_INCLUDE=sqlite_opt.h \  	$(awk '{print "-Wl,--export="$0}' exports.txt) -trap 'rm -f sqlite3.tmp' EXIT  "$BINARYEN/wasm-ctor-eval" -g -c _initialize sqlite3.wasm -o sqlite3.tmp  "$BINARYEN/wasm-opt" -g --strip --strip-producers -c -O3 \  	sqlite3.tmp -o sqlite3.wasm \ diff --git a/vendor/github.com/ncruces/go-sqlite3/embed/exports.txt b/vendor/github.com/ncruces/go-sqlite3/embed/exports.txt index b3cb1581c..e7882cb56 100644 --- a/vendor/github.com/ncruces/go-sqlite3/embed/exports.txt +++ b/vendor/github.com/ncruces/go-sqlite3/embed/exports.txt @@ -55,17 +55,21 @@ sqlite3_create_function_go  sqlite3_create_module_go  sqlite3_create_window_function_go  sqlite3_database_file_object +sqlite3_db_cacheflush  sqlite3_db_config  sqlite3_db_filename  sqlite3_db_name  sqlite3_db_readonly  sqlite3_db_release_memory +sqlite3_db_status  sqlite3_declare_vtab  sqlite3_errcode  sqlite3_errmsg  sqlite3_error_offset  sqlite3_errstr  sqlite3_exec +sqlite3_expanded_sql +sqlite3_file_control  sqlite3_filename_database  sqlite3_filename_journal  sqlite3_filename_wal @@ -100,16 +104,18 @@ sqlite3_step  sqlite3_stmt_busy  sqlite3_stmt_readonly  sqlite3_stmt_status +sqlite3_table_column_metadata  sqlite3_total_changes64 +sqlite3_trace_go  sqlite3_txn_state  sqlite3_update_hook_go  sqlite3_uri_key -sqlite3_uri_parameter  sqlite3_value_blob  sqlite3_value_bytes  sqlite3_value_double  sqlite3_value_dup  sqlite3_value_free +sqlite3_value_frombind  sqlite3_value_int64  sqlite3_value_nochange  sqlite3_value_numeric_type diff --git a/vendor/github.com/ncruces/go-sqlite3/embed/sqlite3.wasm b/vendor/github.com/ncruces/go-sqlite3/embed/sqlite3.wasm Binary files differindex 43a1f99ad..5f4b64a9c 100644 --- a/vendor/github.com/ncruces/go-sqlite3/embed/sqlite3.wasm +++ b/vendor/github.com/ncruces/go-sqlite3/embed/sqlite3.wasm  | 
