go-sqlite3
wazero
go-sqlite3 | wazero | |
---|---|---|
23 | 52 | |
289 | 4,573 | |
- | 2.1% | |
9.5 | 9.8 | |
7 days ago | 4 days ago | |
Go | Go | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
go-sqlite3
-
Show HN: Roast my SQLite encryption at-rest
Yep, I just made it tweakable at build, which was always the intent, although I expect the default to be popular.
https://github.com/ncruces/go-sqlite3/blob/67d859a5/vfs/adia...
That's unfortunate about the default parameters, but note that you can also replace the KDF altogether (besides just not using it).
You just need to implement this interface, with any HBSH construction and KDF:
https://github.com/ncruces/go-sqlite3/blob/67d859a5/vfs/adia...
If you keep the HBSH and change the KDF, your file format will be “compatible.”
-
Jsonfile: A Quick Hack for Tinkering
struggling figuring out how to make my cgo sqlite cross-compile to Windows
Plenty of people trying to fix that.
There's at least:
https://modernc.org/sqlite
Then there's https://github.com/zombiezen/go-sqlite that actually builds https://crawshaw.io/sqlite on top of modernc.
And there's mine that has both a low level and a database/sql driver builds and runs everywhere Go does: https://github.com/ncruces/go-sqlite3
-
SQLite-memory-vfs: Open a SQLite db from memory in Python, without hitting disk
If you're interested both SQLite's and my memdb VFSes implement safe locking.
Depending on your familiarity with Go, mine maybe easier to follow, or not.
https://github.com/ncruces/go-sqlite3/blob/f1b00a9944730eaa9...
-
Show HN: My Go SQLite driver did poorly on a benchmark, so I fixed it
One thing I tried to make sure, to avoid the pitfall modernc is having, is to make sure building "the WASM BLOB" is easily reproducible with widely available tools:
https://github.com/ncruces/go-sqlite3/blob/main/.github/work...
I do apply some light patches to SQLite, but so far they've always cleanly applied, and I can produce a new release within hours of being notified of SQLite releases.
- JSONB Has Landed in SQLite
- Show HN: Go bindings to SQLite using wazero
-
Show HN: Gogosseract, a Go Lib for CGo-Free Tesseract OCR via Wazero
Disclosure: I'm working on alternative Cgo-less bindings for SQLite, using wazero.
https://github.com/ncruces/go-sqlite3
One of the problems of the modernc approach (IMO) is that they're not just transpiring CPU/compute stuff, but entirely OS/platform stuff.
Each Go file of theirs is a xxx_os_arch.go that starts with 100s of OS-#defines-as-consts, and goes on to transpile fully #ifdefed code.
It also implements antithetical (in Go) stuff like goroutine local storage, because libc pthreads can't live without it.
And all IO is via direct syscalls that will never play nice with the Go scheduler, because, again this is OS level stuff.
WASM defines a cross platform CPU and an ABI, and using that for compute and the bottom OS layer in Go you get (IMO) a nicer end result.
Given the hard task of generating decent code from WASM at load time (wazero's compiler is pretty naive, a better one is being developed, but it will take seconds to generate good code for anything non trivial like SQLite) I wouldn't mind having a solution that translated to Go, or Go ASM, at build time.
- Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go
-
Go bindings to SQLite using Wazero
The github.com/ncruces/go-sqlite3 is a link.
-
C to WASM to Go
Using the stack pointer global is an interesting hack. I'd never thought of that. Need to compare with what I'm doing for SQLite (a kind of per connection arena).
wazero
-
Wazero: The zero dependency WebAssembly runtime
https://github.com/tetratelabs/wazero/releases/tag/v1.7.0
This includes the final release of the new optimizing compiler, which is a big improvement over the previous one.
The new version also adds experimental support for threads and snapshot/restore (setjmp/longjmp).
This is already being used by go-pgquery, all will mean that sqlc won't need to ship to almost copies of wazero (these features had been implemented on a friendly fork, and have now been up-streamed).
- Wazero v1.6.0
- Show HN: My Go SQLite driver did poorly on a benchmark, so I fixed it
-
Making Games in Go for Absolute Beginners
> Go actually has one of the best WASM runtimes https://github.com/tetratelabs/wazero
-
WASM by Example
Wazero looks super cool. I saw somewhere that programs can be run with a timeout, which sounds great for sandboxing. The program input is just a slice of bytes [1], so an interesting use case would be to use something like Nats [2] to distribute programs to different servers. Super simple distributed computing!
--
1: https://github.com/tetratelabs/wazero/blob/main/examples/bas...
2: https://natsbyexample.com/examples/messaging/pub-sub/go
-
Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go
It is slower.
The WASM runtime wazero [1] uses a compiler on amd64 and arm64 (on Linux, macOS, Windows, and FreeBSD), but the current compiler is very fast (at compiling), but very naive (generates less than optimal code).
An optimizing compiler is currently being developed, and should be released in the coming months. I'm optimistic that this compiler will cover the performance gap between WASM and modernc.
[1]: https://wazero.io
-
Jacobin: Minimal JVM written in Go and capable of running Java 17 classes
I am a fan of the Jacobin project! For your uses, you may also want to consider wazero [1], a pure-go WebAssembly runtime. Full disclosure: I am on the team :)
[1]: https://wazero.io/
-
Val, a high-level systems programming language
No longer does Wasm/WASI need JS host! There are many spec-compliant runtimes built for environments from tiny embedded systems up to beefy arm/x86 racks:
- https://github.com/bytecodealliance/wasm-micro-runtime
- https://github.com/bytecodealliance/wasmtime
- https://github.com/wasmerio/wasmer
- https://github.com/tetratelabs/wazero
- https://github.com/extism/extism (disclaimer, my company's project - makes wasm easily embeddable into 16+ programming languages!)
-
WebAssembly and Replayable Functions
full disclosure: I don't work on it, but the devs are committers/contributors to https://wazero.io (I am a wazero committer) :)
- Wazero: Zero dependency WebAssembly runtime written in Go
What are some alternatives?
xcgo - Golang cross-platform builder docker image with CGo and other tooling
wasmer - 🚀 The leading Wasm Runtime supporting WASIX, WASI and Emscripten
sqinn - SQLite over stdin/stdout
wasmtime - A fast and secure runtime for WebAssembly
zenity - Zenity dialogs for Golang, Windows, macOS
wasmer-go - 🐹🕸️ WebAssembly runtime for Go
go-sqlite3 - sqlite3 driver for go using database/sql
grule-rule-engine - Rule engine implementation in Golang
go-sqlite - pure-Go SQLite driver for Go (SQLite embedded)
yaegi - Yaegi is Another Elegant Go Interpreter
acmd - Simple, useful and opinionated CLI package in Go.
gc - Branch of the spec repo scoped to discussion of GC integration in WebAssembly