2 ms·
To me, this is the real value of Wasm: platform independent libraries with a standard interface that doesn’t require C.
by iampims 3y ago
To me, this is the real value of Wasm: platform independent libraries with a standard interface that doesn’t require C.
- slimsag 3y agoWASM runtimes miss out on a _lot_ of optimizations that a battle-tested C compiler will perform, and sometimes requires machine emulation (e.g. Go compiled to WASM results in a virtual machine/emulation layer to run Go code.) It can work, but it's not the fastest thing in the world. I think languages that make working with C/C++ code much more seamless, e.g. as nice as working with Go code can be, is a better approach. Zig does this well and feels quite natural coming from Go. It can also be used to make CGO cross compilation 'just work' and alleviate many of those pains.
- iampims 3y agoYes, Zig is best in class for C-interoperability. Go’s FFI support is alright, but I find using WASM/WASI more pleasant.
- dmos62 3y agoI feel like inefficient but convenient has been the default trade-off in so many places during the last couple of decades. WASM is opening the doors for all kinds of new solutions. I wonder what kind of cultures will develop around it, as regards efficiency.