SQLite 3.41.2, prefer speed over size.

This commit is contained in:
Nuno Cruces
2023-03-23 00:44:43 +00:00
parent 859a21ef4e
commit b19c12c4c7
9 changed files with 32 additions and 61 deletions

View File

@@ -1,6 +1,6 @@
# Embeddable WASM build of SQLite
This folder includes an embeddable WASM build of SQLite 3.41.1 for use with
This folder includes an embeddable WASM build of SQLite 3.41.2 for use with
[`github.com/ncruces/go-sqlite3`](https://pkg.go.dev/github.com/ncruces/go-sqlite3).
The following optional features are compiled in:

View File

@@ -4,17 +4,11 @@ set -eo pipefail
cd -P -- "$(dirname -- "$0")"
# build SQLite
zig cc --target=wasm32-wasi -flto -g0 -Os \
zig cc --target=wasm32-wasi -flto -g0 -O2 \
-o sqlite3.wasm ../sqlite3/main.c \
-I../sqlite3/ \
-mmutable-globals \
-mbulk-memory -mreference-types \
-mnontrapping-fptoint -msign-ext \
-D_HAVE_SQLITE_CONFIG_H \
$(awk '{print "-Wl,--export="$0}' exports.txt)
# optimize SQLite
if which wasm-opt; then
wasm-opt -g -O -o sqlite3.tmp sqlite3.wasm
mv sqlite3.tmp sqlite3.wasm
fi
$(awk '{print "-Wl,--export="$0}' exports.txt)

BIN
embed/sqlite3.wasm Normal file → Executable file

Binary file not shown.