5 ms·
What are other such web assembly runtimes and how does Wazero compares to those?
by vira28 3y ago
What are other such web assembly runtimes and how does Wazero compares to those?
- evacchi 3y agoas far as I know wazero is the only zero-dependency Wasm runtime written in Go. This is not just one of those "written in $LANG" kinda deal: most other runtimes require linking against a native library; this in turn plays against a lot of the killer features of Go, such as good tooling, easy cross-compilation, goroutines [0]; so, not requiring Cgo means a team may bring wazero to their Go project without a second thought. As for other features, we may not be as bleeding edge as other projects, but we are a rather tiny team. If you expect support for WASI (preview 1) we have it :) we try to concentrate our effort on high-quality support of stable specs. EDIT: oh, and a huge shout-out to Stealthrocket, they are building a lot of cool stuff on top of wazero: - wzprof, a wasm profiler integrating with pprof https://github.com/stealthrocket/wzprof https://github.com/stealthrocket/wzprof - timecraft, a wasm time-traveling runtime https://github.com/stealthrocket/timecraft https://github.com/stealthrocket/timecraft [0] see "CGO is not Go" https://dave.cheney.net/2016/01/18/cgo-is-not-go https://dave.cheney.net/2016/01/18/cgo-is-not-go
- vira28 3y agoThanks. My question is more of other runtime not specifically about the ones written in Go.
- alecthomas 3y agoThere are a few, but I suspect the most widely used would be wasmtime. It's written in Rust and can be used from Go [2] but requires CGo (as mentioned by GP). [1] https://github.com/bytecodealliance/wasmtime https://github.com/bytecodealliance/wasmtime [2] https://github.com/bytecodealliance/wasmtime-go https://github.com/bytecodealliance/wasmtime-go
- pyrolistical 3y agoZig can directly compile to wasm. Since most of zig’s std is pure zig, you can use it as is. It’s also zero dep
- thangngoc89 3y agoBut this is the runtime, not the compilation. Drop a single executable on the target machine and it can run wasm files (compiled from Zig, Rust, ...)
- pyrolistical 3y agoAh. That’s what they meant. Why tell us it’s written in go then?
- pacoverdi 3y agoBecause it means that it can be used as a library in pure Go programs.