diff options
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3')
-rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/README.md | 7 | ||||
-rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/embed/build.sh | 2 | ||||
-rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/embed/sqlite3.wasm | bin | 1365234 -> 1364101 bytes | |||
-rw-r--r-- | vendor/github.com/ncruces/go-sqlite3/internal/util/mmap.go | 20 |
4 files changed, 13 insertions, 16 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/README.md b/vendor/github.com/ncruces/go-sqlite3/README.md index 25b2ccbe4..8cf9e7a81 100644 --- a/vendor/github.com/ncruces/go-sqlite3/README.md +++ b/vendor/github.com/ncruces/go-sqlite3/README.md @@ -45,12 +45,16 @@ Go, wazero and [`x/sys`](https://pkg.go.dev/golang.org/x/sys) are the _only_ run reads data [line-by-line](https://github.com/asg017/sqlite-lines). - [`github.com/ncruces/go-sqlite3/ext/pivot`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/pivot) creates [pivot tables](https://github.com/jakethaw/pivot_vtab). +- [`github.com/ncruces/go-sqlite3/ext/regexp`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/regexp) + provides regular expression functions. - [`github.com/ncruces/go-sqlite3/ext/statement`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/statement) creates [parameterized views](https://github.com/0x09/sqlite-statement-vtab). - [`github.com/ncruces/go-sqlite3/ext/stats`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/stats) provides [statistics](https://www.oreilly.com/library/view/sql-in-a/9780596155322/ch04s02.html) functions. - [`github.com/ncruces/go-sqlite3/ext/unicode`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/unicode) provides [Unicode aware](https://sqlite.org/src/dir/ext/icu) functions. +- [`github.com/ncruces/go-sqlite3/ext/uuid`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/uuid) + generates [UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier). - [`github.com/ncruces/go-sqlite3/ext/zorder`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/zorder) maps multidimensional data to one dimension. - [`github.com/ncruces/go-sqlite3/vfs/adiantum`](https://pkg.go.dev/github.com/ncruces/go-sqlite3/vfs/adiantum) @@ -91,7 +95,8 @@ It also benefits greatly from [SQLite's](https://sqlite.org/testing.html) and Every commit is [tested](.github/workflows/test.yml) on Linux (amd64/arm64/386/riscv64/s390x), macOS (amd64/arm64), -Windows (amd64), FreeBSD (amd64), illumos (amd64), and Solaris (amd64). +Windows (amd64), FreeBSD (amd64), OpenBSD (amd64), NetBSD (amd64), +illumos (amd64), and Solaris (amd64). The Go VFS is tested by running SQLite's [mptest](https://github.com/sqlite/sqlite/blob/master/mptest/mptest.c). diff --git a/vendor/github.com/ncruces/go-sqlite3/embed/build.sh b/vendor/github.com/ncruces/go-sqlite3/embed/build.sh index abe5e60c4..8ea380e26 100644 --- a/vendor/github.com/ncruces/go-sqlite3/embed/build.sh +++ b/vendor/github.com/ncruces/go-sqlite3/embed/build.sh @@ -7,7 +7,7 @@ ROOT=../ BINARYEN="$ROOT/tools/binaryen-version_117/bin" WASI_SDK="$ROOT/tools/wasi-sdk-22.0/bin" -"$WASI_SDK/clang" --target=wasm32-wasi -std=c17 -flto -g0 -O2 \ +"$WASI_SDK/clang" --target=wasm32-wasi -std=c23 -flto -g0 -O2 \ -Wall -Wextra -Wno-unused-parameter -Wno-unused-function \ -o sqlite3.wasm "$ROOT/sqlite3/main.c" \ -I"$ROOT/sqlite3" \ 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 8dfc7da0c..43a1f99ad 100644 --- a/vendor/github.com/ncruces/go-sqlite3/embed/sqlite3.wasm +++ b/vendor/github.com/ncruces/go-sqlite3/embed/sqlite3.wasm diff --git a/vendor/github.com/ncruces/go-sqlite3/internal/util/mmap.go b/vendor/github.com/ncruces/go-sqlite3/internal/util/mmap.go index a4fa2a25a..434cc12ad 100644 --- a/vendor/github.com/ncruces/go-sqlite3/internal/util/mmap.go +++ b/vendor/github.com/ncruces/go-sqlite3/internal/util/mmap.go @@ -46,7 +46,7 @@ func (s *mmapState) new(ctx context.Context, mod api.Module, size int32) *Mapped // Save the newly allocated region. ptr := uint32(stack[0]) buf := View(mod, ptr, uint64(size)) - addr := uintptr(unsafe.Pointer(&buf[0])) + addr := unsafe.Pointer(&buf[0]) s.regions = append(s.regions, &MappedRegion{ Ptr: ptr, addr: addr, @@ -56,7 +56,7 @@ func (s *mmapState) new(ctx context.Context, mod api.Module, size int32) *Mapped } type MappedRegion struct { - addr uintptr + addr unsafe.Pointer Ptr uint32 size int32 used bool @@ -76,23 +76,15 @@ func (r *MappedRegion) Unmap() error { // We can't munmap the region, otherwise it could be remaped. // Instead, convert it to a protected, private, anonymous mapping. // If successful, it can be reused for a subsequent mmap. - _, err := mmap(r.addr, uintptr(r.size), - unix.PROT_NONE, unix.MAP_PRIVATE|unix.MAP_ANON|unix.MAP_FIXED, - -1, 0) + _, err := unix.MmapPtr(-1, 0, r.addr, uintptr(r.size), + unix.PROT_NONE, unix.MAP_PRIVATE|unix.MAP_FIXED|unix.MAP_ANON) r.used = err != nil return err } func (r *MappedRegion) mmap(f *os.File, offset int64, prot int) error { - _, err := mmap(r.addr, uintptr(r.size), - prot, unix.MAP_SHARED|unix.MAP_FIXED, - int(f.Fd()), offset) + _, err := unix.MmapPtr(int(f.Fd()), offset, r.addr, uintptr(r.size), + prot, unix.MAP_SHARED|unix.MAP_FIXED) r.used = err == nil return err } - -// We need the low level mmap for MAP_FIXED to work. -// Bind the syscall version hoping that it is more stable. - -//go:linkname mmap syscall.mmap -func mmap(addr, length uintptr, prot, flag, fd int, pos int64) (*byte, error) |