4 ms·
Outside of the web, Wasm is useful anywhere that you might use a scripting language embedded in a program. For example, Lua with game engines. You could replace
by cornstalks 3y ago
Outside of the web, Wasm is useful anywhere that you might use a scripting language embedded in a program. For example, Lua with game engines. You could replace the scripting layer (e.g., Lua) with Wasm. Some might see this as pointless, but others, like myself, see this as an opportunity to do some cool things. Some things I'm excited for are (1) wasm-c-api, which creates a VM-agnostic API so I can swap out VM implementations without recoding my app; (2) great performance, since there are many Wasm VMs that are heavily optimized for both quick startup and maximum speed; (3) the ability to use many languages, which means I can use a consistent language for the main game and the scripting files.
- rockwotj 3y agoI think the wasm C API is not going to live up to the promise. To actually use high performance features you need many additions to that API that most implementations provide, thus making it less portable. Source: I contribute a lot to wasmtime’s C API and build Redpanda’s Wasm Data Transforms using it
- cornstalks 3y agoYeah and wasm-c-api has stalled (they still don’t support v128, for example). I’m currently exploring starting an unsanctioned v2 wasm-c-api that aims to be feature complete and hopefully more performance focused.
- rockwotj 3y agoWould be super interested in this if you explore this more! Feel free to reach out (contact info linked from my bio) if you’re interested in collaborating.
- kelp 3y agoI'd been hoping projects like wasmtime could end up looking like a Docker alternative for server side things. Do you think that's unlikely to pan out without a lot more work that doesn't seem to be happening?
- rockwotj 3y agoOh it’s certainly looking like that IMO depending on your use case for docker You can run wasm in k8s: https://krustlet.dev/ https://krustlet.dev/ Docker itself can run wasm: https://wasmlabs.dev/articles/docker-without-containers/ https://wasmlabs.dev/articles/docker-without-containers/ There are a few serverless runtimes based on wasm: https://wasmcloud.com/ https://wasmcloud.com/ A lot of those are powered by wasmtime or WasmEdge. If you’re wanting to be able to just pull down a random app and run it as wasm, that’s inherently harder with wasm, because you have to recompile, and amazing compiling stuff is always harder than it should be. For example I compiled jq to wasm to other day, so you dont have to worry (as much) about the CVEs that was issued recently. https://github.com/rockwotj/jq-wasi https://github.com/rockwotj/jq-wasi