SQLite 3.43.2.

This commit is contained in:
Nuno Cruces
2023-10-12 10:50:56 +01:00
parent a33a187d48
commit d5d7cd1f2d
13 changed files with 44 additions and 30 deletions

View File

@@ -1,6 +1,6 @@
# Embeddable WASM build of SQLite
This folder includes an embeddable WASM build of SQLite 3.43.1 for use with
This folder includes an embeddable WASM build of SQLite 3.43.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:

Binary file not shown.

View File

@@ -3,7 +3,7 @@ set -euo pipefail
cd -P -- "$(dirname -- "$0")"
curl -#OL "https://sqlite.org/2023/sqlite-amalgamation-3430100.zip"
curl -#OL "https://sqlite.org/2023/sqlite-amalgamation-3430200.zip"
unzip -d . sqlite-amalgamation-*.zip
mv sqlite-amalgamation-*/sqlite3* .
rm -rf sqlite-amalgamation-*
@@ -12,24 +12,24 @@ cat *.patch | patch --posix
mkdir -p ext/
cd ext/
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/ext/misc/decimal.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/ext/misc/uint.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/ext/misc/uuid.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/ext/misc/base64.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/ext/misc/regexp.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/ext/misc/series.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/ext/misc/anycollseq.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/ext/misc/decimal.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/ext/misc/uint.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/ext/misc/uuid.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/ext/misc/base64.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/ext/misc/regexp.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/ext/misc/series.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/ext/misc/anycollseq.c"
cd ~-
cd ../vfs/tests/mptest/testdata/
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/mptest/mptest.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/mptest/config01.test"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/mptest/config02.test"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/mptest/crash01.test"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/mptest/crash02.subtest"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/mptest/multiwrite01.test"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/mptest/mptest.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/mptest/config01.test"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/mptest/config02.test"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/mptest/crash01.test"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/mptest/crash02.subtest"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/mptest/multiwrite01.test"
cd ~-
cd ../vfs/tests/speedtest1/testdata/
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.1/test/speedtest1.c"
curl -#OL "https://github.com/sqlite/sqlite/raw/version-3.43.2/test/speedtest1.c"
cd ~-

View File

@@ -2,6 +2,7 @@ package mptest
import (
"bytes"
"compress/bzip2"
"context"
"crypto/rand"
"embed"
@@ -24,8 +25,8 @@ import (
"github.com/tetratelabs/wazero/imports/wasi_snapshot_preview1"
)
//go:embed testdata/mptest.wasm
var binary []byte
//go:embed testdata/mptest.wasm.bz2
var compressed string
//go:embed testdata/*.*test
var scripts embed.FS
@@ -48,6 +49,11 @@ func TestMain(m *testing.M) {
panic(err)
}
binary, err := io.ReadAll(bzip2.NewReader(strings.NewReader(compressed)))
if err != nil {
panic(err)
}
module, err = rt.CompileModule(ctx, binary)
if err != nil {
panic(err)

View File

@@ -1,2 +1,2 @@
mptest.wasm filter=lfs diff=lfs merge=lfs -text
mptest.wasm.bz2 filter=lfs diff=lfs merge=lfs -text
*.*test -crlf

View File

@@ -28,4 +28,5 @@ WASI_SDK="$ROOT/tools/wasi-sdk-20.0/bin"
--enable-simd --enable-mutable-globals --enable-multivalue \
--enable-bulk-memory --enable-reference-types \
--enable-nontrapping-float-to-int --enable-sign-ext
mv mptest.tmp mptest.wasm
mv mptest.tmp mptest.wasm
bzip2 -9f mptest.wasm

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5b77e9e13a487e976a6e71bc698542098433d1cc586ad8f24784f1f325ffb8dd
size 1459145

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:816ddd36a255d2b3995f75924bdebd9dc7c4378eeccbe28176751434cfb788ca
size 508404

View File

@@ -2,6 +2,7 @@ package speedtest1
import (
"bytes"
"compress/bzip2"
"context"
"crypto/rand"
"flag"
@@ -23,8 +24,8 @@ import (
_ "github.com/ncruces/go-sqlite3/vfs/memdb"
)
//go:embed testdata/speedtest1.wasm
var binary []byte
//go:embed testdata/speedtest1.wasm.bz2
var compressed string
var (
rt wazero.Runtime
@@ -45,6 +46,11 @@ func TestMain(m *testing.M) {
panic(err)
}
binary, err := io.ReadAll(bzip2.NewReader(strings.NewReader(compressed)))
if err != nil {
panic(err)
}
module, err = rt.CompileModule(ctx, binary)
if err != nil {
panic(err)

View File

@@ -1 +1 @@
speedtest1.wasm filter=lfs diff=lfs merge=lfs -text
speedtest1.wasm.bz2 filter=lfs diff=lfs merge=lfs -text

View File

@@ -23,4 +23,5 @@ WASI_SDK="$ROOT/tools/wasi-sdk-20.0/bin"
--enable-simd --enable-mutable-globals --enable-multivalue \
--enable-bulk-memory --enable-reference-types \
--enable-nontrapping-float-to-int --enable-sign-ext
mv speedtest1.tmp speedtest1.wasm
mv speedtest1.tmp speedtest1.wasm
bzip2 -9f speedtest1.wasm

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3b52de3306965ac3f812592be29697d75232802a13bb16a34344f8d81dbf0637
size 1499410

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c0c551f14aeb338ab652f2bded33ba58188b76f2cb24ca076576c968341f841e
size 523315