back

by vira28·3y ago·view on hn ↗
What are other such web assembly runtimes and how does Wazero compares to those?
2 comments
as 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

- timecraft, a wasm time-traveling runtime https://github.com/stealthrocket/timecraft

[0] see "CGO is not Go" https://dave.cheney.net/2016/01/18/cgo-is-not-go

Thanks. My question is more of other runtime not specifically about the ones written in Go.
There 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 [2] https://github.com/bytecodealliance/wasmtime-go

Zig 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
But 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, ...)
Ah. That’s what they meant. Why tell us it’s written in go then?
Because it means that it can be used as a library in pure Go programs.