diff --git a/embed/bcw2/bcw2.wasm b/embed/bcw2/bcw2.wasm index dd2ed36..7e5edbf 100755 Binary files a/embed/bcw2/bcw2.wasm and b/embed/bcw2/bcw2.wasm differ diff --git a/embed/bcw2/bcw2_test.go b/embed/bcw2/bcw2_test.go index 03e5f3c..73d722c 100644 --- a/embed/bcw2/bcw2_test.go +++ b/embed/bcw2/bcw2_test.go @@ -53,7 +53,7 @@ func Test_bcw2(t *testing.T) { if err != nil { t.Fatal(err) } - if version != "3.51.0" { + if version != "3.52.0" { t.Error(version) } } diff --git a/embed/bcw2/build.sh b/embed/bcw2/build.sh index 3e300ec..bd931c4 100755 --- a/embed/bcw2/build.sh +++ b/embed/bcw2/build.sh @@ -15,9 +15,9 @@ cp "$ROOT"/sqlite3/*.[ch] build/ cp "$ROOT"/sqlite3/*.patch build/ cd sqlite/ -# https://sqlite.org/src/info/0e862bc9ed7aa9ae -curl -#L https://github.com/sqlite/sqlite/archive/0b99392.tar.gz | tar xz --strip-components=1 -# curl -#L https://sqlite.org/src/tarball/sqlite.tar.gz?r=0e862bc9ed | tar xz --strip-components=1 +# https://sqlite.org/src/info/352b363a5d727047 +curl -#L https://github.com/sqlite/sqlite/archive/dbd613c.tar.gz | tar xz --strip-components=1 +# curl -#L https://sqlite.org/src/tarball/sqlite.tar.gz?r=352b363a5d | tar xz --strip-components=1 if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then MSYS_NO_PATHCONV=1 nmake /f makefile.msc sqlite3.c "OPTS=-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT -DSQLITE_ENABLE_ORDERED_SET_AGGREGATES" diff --git a/go.mod b/go.mod index 8096c1f..9496957 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/dchest/siphash v1.2.3 // ext/bloom github.com/google/uuid v1.6.0 // ext/uuid github.com/psanford/httpreadat v0.1.0 // example - golang.org/x/crypto v0.44.0 // vfs/adiantum vfs/xts + golang.org/x/crypto v0.45.0 // vfs/adiantum vfs/xts golang.org/x/sync v0.18.0 // test golang.org/x/text v0.31.0 // ext/unicode lukechampine.com/adiantum v1.1.1 // vfs/adiantum diff --git a/go.sum b/go.sum index 2e94f5a..5f6460b 100644 --- a/go.sum +++ b/go.sum @@ -12,8 +12,8 @@ github.com/psanford/httpreadat v0.1.0 h1:VleW1HS2zO7/4c7c7zNl33fO6oYACSagjJIyMIw github.com/psanford/httpreadat v0.1.0/go.mod h1:Zg7P+TlBm3bYbyHTKv/EdtSJZn3qwbPwpfZ/I9GKCRE= github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8= github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU= -golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU= -golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= +golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= +golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= diff --git a/internal/alloc/alloc_unix.go b/internal/alloc/alloc_unix.go index 203d847..b6a9fd6 100644 --- a/internal/alloc/alloc_unix.go +++ b/internal/alloc/alloc_unix.go @@ -5,8 +5,9 @@ package alloc import ( "math" - "github.com/tetratelabs/wazero/experimental" "golang.org/x/sys/unix" + + "github.com/tetratelabs/wazero/experimental" ) func NewMemory(cap, max uint64) experimental.LinearMemory { diff --git a/internal/alloc/alloc_windows.go b/internal/alloc/alloc_windows.go index ef83f01..d026225 100644 --- a/internal/alloc/alloc_windows.go +++ b/internal/alloc/alloc_windows.go @@ -5,8 +5,9 @@ import ( "reflect" "unsafe" - "github.com/tetratelabs/wazero/experimental" "golang.org/x/sys/windows" + + "github.com/tetratelabs/wazero/experimental" ) func NewMemory(cap, max uint64) experimental.LinearMemory { diff --git a/internal/util/mmap_unix.go b/internal/util/mmap_unix.go index 42a2475..d3cc411 100644 --- a/internal/util/mmap_unix.go +++ b/internal/util/mmap_unix.go @@ -7,8 +7,9 @@ import ( "os" "unsafe" - "github.com/tetratelabs/wazero/api" "golang.org/x/sys/unix" + + "github.com/tetratelabs/wazero/api" ) type mmapState struct { diff --git a/litestream/api.go b/litestream/api.go index 76328e1..3b6067a 100644 --- a/litestream/api.go +++ b/litestream/api.go @@ -7,6 +7,7 @@ import ( "time" "github.com/benbjohnson/litestream" + "github.com/ncruces/go-sqlite3/vfs" ) diff --git a/litestream/example_test.go b/litestream/example_test.go index 712a09f..8c89387 100644 --- a/litestream/example_test.go +++ b/litestream/example_test.go @@ -5,6 +5,7 @@ import ( "time" "github.com/benbjohnson/litestream/s3" + "github.com/ncruces/go-sqlite3/driver" _ "github.com/ncruces/go-sqlite3/embed" "github.com/ncruces/go-sqlite3/litestream" diff --git a/litestream/go.mod b/litestream/go.mod index d03424c..2958f91 100644 --- a/litestream/go.mod +++ b/litestream/go.mod @@ -28,13 +28,13 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.67.2 // indirect + github.com/prometheus/common v0.67.3 // indirect github.com/prometheus/procfs v0.19.2 // indirect github.com/psanford/sqlite3vfs v0.0.0-20240315230605-24e1d98cf361 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect - golang.org/x/crypto v0.44.0 // indirect + golang.org/x/crypto v0.45.0 // indirect google.golang.org/protobuf v1.36.10 // indirect - modernc.org/sqlite v1.40.0 // indirect + modernc.org/sqlite v1.40.1 // indirect ) // github.com/benbjohnson/litestream/s3 diff --git a/litestream/go.sum b/litestream/go.sum index 9832003..23fa9e4 100644 --- a/litestream/go.sum +++ b/litestream/go.sum @@ -133,8 +133,8 @@ github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.67.2 h1:PcBAckGFTIHt2+L3I33uNRTlKTplNzFctXcWhPyAEN8= -github.com/prometheus/common v0.67.2/go.mod h1:63W3KZb1JOKgcjlIr64WW/LvFGAqKPj0atm+knVGEko= +github.com/prometheus/common v0.67.3 h1:shd26MlnwTw5jksTDhC7rTQIteBxy+ZZDr3t7F2xN2Q= +github.com/prometheus/common v0.67.3/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI= github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= github.com/psanford/sqlite3vfs v0.0.0-20240315230605-24e1d98cf361 h1:vAKifIJuYY306ZJSrwDgKonWcJGELijdaenABqbV03E= @@ -163,10 +163,10 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= -golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU= -golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= -golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= -golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= +golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= +golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= +golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= +golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= diff --git a/litestream/vfs.go b/litestream/vfs.go index b2f4be6..f92f93e 100644 --- a/litestream/vfs.go +++ b/litestream/vfs.go @@ -10,11 +10,12 @@ import ( "time" "github.com/benbjohnson/litestream" + "github.com/superfly/ltx" + "github.com/ncruces/go-sqlite3" "github.com/ncruces/go-sqlite3/util/vfsutil" "github.com/ncruces/go-sqlite3/vfs" "github.com/ncruces/wbt" - "github.com/superfly/ltx" ) type liteVFS struct{} diff --git a/litestream/vfs_test.go b/litestream/vfs_test.go index 0fb2a38..30237b8 100644 --- a/litestream/vfs_test.go +++ b/litestream/vfs_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/benbjohnson/litestream" + _ "github.com/ncruces/go-sqlite3/embed" ) diff --git a/sqlite3/tools.sh b/sqlite3/tools.sh index 60d08dc..b100cfd 100755 --- a/sqlite3/tools.sh +++ b/sqlite3/tools.sh @@ -26,8 +26,8 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then fi fi -WASI_SDK="https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-28/wasi-sdk-28.0-$WASI_SDK.tar.gz" -BINARYEN="https://github.com/WebAssembly/binaryen/releases/download/version_124/binaryen-version_124-$BINARYEN.tar.gz" +WASI_SDK="https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-29/wasi-sdk-29.0-$WASI_SDK.tar.gz" +BINARYEN="https://github.com/WebAssembly/binaryen/releases/download/version_125/binaryen-version_125-$BINARYEN.tar.gz" # Download tools mkdir -p "$ROOT/tools" diff --git a/vfs/adiantum/adiantum.go b/vfs/adiantum/adiantum.go index cb4c1de..edcca0f 100644 --- a/vfs/adiantum/adiantum.go +++ b/vfs/adiantum/adiantum.go @@ -4,6 +4,7 @@ import ( "crypto/rand" "golang.org/x/crypto/argon2" + "lukechampine.com/adiantum" "lukechampine.com/adiantum/hbsh" ) diff --git a/vfs/adiantum/example_test.go b/vfs/adiantum/example_test.go index d696aa8..4b9aa59 100644 --- a/vfs/adiantum/example_test.go +++ b/vfs/adiantum/example_test.go @@ -8,6 +8,7 @@ import ( "os" "golang.org/x/crypto/argon2" + "lukechampine.com/adiantum/hbsh" "lukechampine.com/adiantum/hpolyc" diff --git a/vfs/shm_bsd.go b/vfs/shm_bsd.go index fc5303a..56f7dec 100644 --- a/vfs/shm_bsd.go +++ b/vfs/shm_bsd.go @@ -11,9 +11,10 @@ import ( "os" "sync" - "github.com/tetratelabs/wazero/api" "golang.org/x/sys/unix" + "github.com/tetratelabs/wazero/api" + "github.com/ncruces/go-sqlite3/internal/util" ) diff --git a/vfs/shm_ofd.go b/vfs/shm_ofd.go index e61ae7e..690bcc4 100644 --- a/vfs/shm_ofd.go +++ b/vfs/shm_ofd.go @@ -9,9 +9,10 @@ import ( "sync" "time" - "github.com/tetratelabs/wazero/api" "golang.org/x/sys/unix" + "github.com/tetratelabs/wazero/api" + "github.com/ncruces/go-sqlite3/internal/util" ) diff --git a/vfs/shm_windows.go b/vfs/shm_windows.go index 33e6599..fe491e7 100644 --- a/vfs/shm_windows.go +++ b/vfs/shm_windows.go @@ -8,9 +8,10 @@ import ( "os" "sync" - "github.com/tetratelabs/wazero/api" "golang.org/x/sys/windows" + "github.com/tetratelabs/wazero/api" + "github.com/ncruces/go-sqlite3/internal/util" ) diff --git a/vfs/tests/mptest/wasm/mptest.wasm b/vfs/tests/mptest/wasm/mptest.wasm index 87811dd..3a8ccd3 100644 Binary files a/vfs/tests/mptest/wasm/mptest.wasm and b/vfs/tests/mptest/wasm/mptest.wasm differ diff --git a/vfs/tests/speedtest1/wasm/speedtest1.wasm b/vfs/tests/speedtest1/wasm/speedtest1.wasm index e1d0ca7..42bb69c 100644 Binary files a/vfs/tests/speedtest1/wasm/speedtest1.wasm and b/vfs/tests/speedtest1/wasm/speedtest1.wasm differ