mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
SQLite 3.41.2, prefer speed over size.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
BIN
embed/sqlite3.wasm
Normal file → Executable file
Binary file not shown.
Reference in New Issue
Block a user