Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've used wazero for a pet project (raw wasm generation from simple query plans) and it was really nice to work with!

I also had to play around a bit with wasm relocations and the encoding/decoding libraries they've built are very readable, too, so I was able to hack together what I needed.

Fingers crossed for the optimizing compiler that's planned for some point!



what are you using for generating wasm? tinygo or new go runtime support of wasm? what are the sizes of wasm binaries? last i checked helloworld was in the order of few MB's.


The project was a custom compiler to turn a simple query plan (think select, where, group by) into wasm. So it was basically hand-written raw wasm generation.

I did compile some helper functions from Rust though, which also served as the "skeleton" of the wasm artifact I was later generating my wasm into, since wasm doesn't have any kind of proper dynamic linking right now.


Love to see what this looks like if its available to look at somewhere (Github?). Sounds super interesting, even as a toy project


Never got it to anything close to a finished state, instead moving on to doing the same prototype in llvm and then cranelift.

That said, here's some of the wazero-based code on a branch - https://github.com/cube2222/octosql/tree/wasm-experiment/was...

It really is just a very very basic prototype.


tinygo still wins for size, and the reflection story got better (json works!). The traditional Go compiler produces larger binary but OTOH it's super-fast, as fast as native builds!




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: