3 ms·
Wasm started in the web, but has since been ported even to the Linux kernel [0]. It seems perfect for situation where you near machine code levels of performanc
by franga2000 5y ago
Wasm started in the web, but has since been ported even to the Linux kernel [0]. It seems perfect for situation where you near machine code levels of performance, but don't want to carry different binaries for different CPU architectures - exactly what you want from a plugin system. It also allows far greater isolation than "real" compiled code.
[0] https://github.com/wasmerio/kernel-wasm https://github.com/wasmerio/kernel-wasm
- hutzlibu 5y agoSo has this been successfully used, as a base of a scripting language yet? The theoretic benefits of wasm I know, but I thought it would need more time, to be useful in that area?
- franga2000 5y agoI don't know of any examples, no, but I also don't really follow the space much outside of web tech (desperately trying to get away from JS).
- nikooellegaard 5y agoI believe envoy uses it for plugins https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/wasm-cc https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/...
- bobbyskelton41 5y agohttps://nullderef.com/blog/plugin-tech/#_prior_art https://nullderef.com/blog/plugin-tech/#_prior_art Basically: https://github.com/zellij-org/zellij https://github.com/zellij-org/zellij https://github.com/veloren/veloren https://github.com/veloren/veloren https://github.com/feather-rs/feather https://github.com/feather-rs/feather
- sime2009 5y agoWASM code by itself can run at near C speeds, but where you are going to find the challenges is crossing the wasm <-> "rest of our app" divide. You can call functions living in WASM with integer arguments and WASM can call functions you expose to it. You're host app has access to the WASM memory space though, and with those tools you have to craft your API. For a text editor there are going to be quite a few hoops to jump through and memory copying going on just to let a plugin read the document text. Platforms like JVM, .Net, and nodejs/Electron have a huge advantage when doing extensions because they are can easily load code at runtime, and pass "platform native" data structures directly into extension code. Compilers exist for many languages which can target these platforms.