7 ms·
Show HN: Wasmer – A Go library for executing WebAssembly binaries
- skybrian 7y agoThis seems a bit confusing since "Wasmer" is also the name of the umbrella project.
- peter998 7y agoThanks for the ping! We decided to use the same name (Wasmer) for the language embeddings as for the standalone runtime as we thought it could be easier for people to find related resources for the runtime. Hopefully is not too confusing! :)
- skybrian 7y agoThe more usual solution would be to use a longer name containing "Wasmer". So, "Wasmer Go Library" or "Wasmer for Go" or something like that.
- kstenerud 7y agoVery cool! Could you add "native" to the benchmark so that we get a better idea of the scale?
- jedisct1 7y agoWebAssembly is still being designed as we speak, but I love how Wasmer has been the "less talk more action" actor since the beginning. That being said, and while it's cool to be able to run WebAssembly code from PHP, Ruby, Python or Go, I'd love to hear about some actual use case for this. Being able to reuse code across multiple languages is nice, but that's already doable, and usually easier and faster, by building a shared library and using a FFI interface. Is it only about the debatable security of WebAssembly's linear memory model?
- mbzi 7y ago> "I'd love to hear about some actual use case for this" I use WebAssembly for non security critical but fun in browser Augmented Reality experiences. We have an ever improving 10 year old fully tested C++ SDK which has bindings to iOS, Android, Windows (DLL, Electron forms), and macOS. We use Emscripten to transpile our code to ASM.JS and WebAssembly for the JavaScript in browser version. From a company perspective it is great to reuse well tested code on another platform without investing time rewriting it. From a developer perspective it allows my R&D engineers to write what they love in the language of their choice. Not fighting a new language each time. From a user perspective the speed of WASM is significantly faster than pure JS and even ASM.js. This increases the experience frame rate from ~30 to 60+. So all in all I am a huge fan of WebAssembly experiences. The only major problem encountered was when Spectre / Meltdown appeared we had issues around SharedArrayBuffer which resulted in temporarily moving clients from WASM to ASM.JS, but we have found solutions for this since.
- jedisct1 7y agoSure, but this is off-topic. My question was about why one would want to call WebAssembly functions from Go or PHP.
- 8lall0 7y agoYou can use wasm as a lingua franca between languages if you have some good libraries or programs that you want to share.
- jedisct1 7y agoLike... a shared library? I have a single libmysql.so file installed on my system, and it's used by Python, Ruby, C and PHP. Why should I replace libmysql.so with libmysql.wasm?
- chownie 7y agoBecause libmysql.wasm runs on any platform whereas libmysql.so has to be replaced with libmysql.dll on windows.