Switching away from wazero #361
Replies: 6 comments 17 replies
-
|
I'll definitely be taking a look at this new project of yours 👀 |
Beta Was this translation helpful? Give feedback.
-
|
Very cool! It will be interesting to see how the performance changes. I find modern and you wasm version too each have performance advantages in different areas that I can necessarily explain. I switch between them for apps where I want to be independent of CGo and pick the version which handles the critical paths the best. I wish you all the best in this effort. I'm happy to assist as a tester if you need me. lbe Edit: Will this allow you to support mmap_size? |
Beta Was this translation helpful? Give feedback.
-
|
Compiling wasm2go sources seems quite heavy, on my machine it took ~40 seconds and 4GiB of RAM to compile a source generated from an sqlite3 WASM build. Once it's in the build cache it's quick, but it's quite a shift from the light weight wazero + embedded WASM binary. I could see it being an issue if someone is trying to compile on a low-end system or something like a single-board computer or low spec CI runner. |
Beta Was this translation helpful? Give feedback.
-
|
This is ready to try at #362. I'll likely merge it to main, and create a branch for the wazero version. |
Beta Was this translation helpful? Give feedback.
-
|
Slightly off-topic, but I just switched one of my wazero-based bindings (github.com/pgaskin/go-marisa) to wasm2go, and it seems pretty good overall. Benchmarkspecs
wasm2go075b64a04783d6c188ac9f66ea52688bc71edb9e wazero37cde21a937175ff0928e5e6035b00a08be91daa benchstatIt passes all tests, and performs better in almost every way except for one SIMD-heavy part (build). |
Beta Was this translation helpful? Give feedback.
-
|
This is perfect and timely - i was hitting performance issues and instability with Wasm in Wasm . Many thanks for all of this |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The current version, or more realistically the next version, of this SQLite bindings/driver will likely be the last ones to depend on wazero.
wazero has served me really well here, and is the reason this even exists. I'm also a wazero maintainer, and as time permits, I plan to continue that role.
However, I've spent the past few weeks developing wasm2go which I feel will serve this project better.
wasm2go does not obsolete wazero, which will always be relevant if you want to load Wasm modules at runtime. Or if you need pre-baked WASI/emscripten host modules (which I won't provide).
But for SQLite, it resolves long standing issues, such as the slow performance on interpreter targets, and slow startup on compiler targets. And seems, frankly, easier to maintain going forward than wazero (even considering the bus factor of 1).
So, as wasm2go stabilizes, I will very likely be moving to using it.
This will require some breaking changes, but mostly related to import paths and wazero configuration. I don't expect any changes to the SQLite API, at all. The transition should be really seamless.
Beta Was this translation helpful? Give feedback.
All reactions