Skip to content

Comment on Show HN: Gogosseract, a Go Lib for CGo-Free Tesseract OCR via Wazero

Comments

To me, this is the real value of Wasm: platform independent libraries with a standard interface that doesn’t require C.

WASM 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.

I 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.

Yes, Zig is best in class for C-interoperability.

Go’s FFI support is alright, but I find using WASM/WASI more pleasant.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.