4 ms·
So, are there actual uses (not just potential use cases) of webassembly beyond games and crypto-mining?
by wheresmycraisin 5y ago
So, are there actual uses (not just potential use cases) of webassembly beyond games and crypto-mining?
- kadoban 5y agoUsing the same language for your frontend and backend has a lot of advantages in terms of code reuse and it's potentially easier in terms of the number of skills your team needs.
- jeroenhd 5y agoOne use case I've seen is mostly-safe arbitrary code execution as a service. Because WASM doesn't have a direct method of calling system API functions, you have quite a lot of control over the runtime. Most JS engines are too powerful to just run arbitrary code (especially if they're not run inside a browser) and other tools (LUA etc.) have libraries that usually assume that the program is not executing code from third parties. With many if not most WASM libraries, there is no unmetered networking, there is no I/O, only methods you explicitly write call wrappers for. For tools like Cloudflare Workers, WASM can be used as a format that executes relatively quickly, relatively safely. Most software won't be in a position where you'd want to push third party blobs of code and execute it in the backend, but for some programs (SaaS + custom report generation?) it can be a nice plugin platform. There are, of course, alternatives, but since LLVM and GraalVM compile to WASM, there are tons of languages that can generate a compatible blob. There is something to be said for code reuse, but the speed of the WASM <-> JS bridge to interact with the DOM makes that use case quite difficult to accomplish efficiently.
- devmunchies 5y agoyes. WASI has the potential to replace containerized services (ie. docker, k8s).