News for hackers. Stuff that matters.
Re:WebAssembly doesn’t make unsafe languages safe by josephg on Sunday November 25, 2018 @09:57PM (#18530700)
The advantage is that code run through WASM is fast, sandboxed and platform-independant. Nothing else is capable of giving you all 3 of those features.

Embedded scripting languages (JS / Lua) are platform-independant and sandboxed, but much slower than native code.

C is fast and small. It can be very carefully sandboxed by the OS (eg iOS apps) but the sandbox has historically been very leaky. Also binaries must target a specific hardware architecture.

The JVM & .NET environments are platform independent, but their heavy reliance on garbage collection slow them down. They also both have large runtime environments which makes them more awkward to embed. I wouldn't want to embed the JRE inside the linux kernel or in a web browser because its so big and it has such a terrible security track record. But WASM would work great.

What other technology would be a good fit for making mods for a multiplayer game? Java? Too bloated. Lua? Workable but slow. C? You can't ship 3rd party mods safely and even if you could they would need to be recompiled for every platform. But WASM will work great. What other tech could you use to run a user-supplied filesystem driver in-kernel? Everything else is too slow (lua) or too unsafe (C).

Re:WebAssembly doesn’t make unsafe languages safe by pier25 on Sunday November 25, 2018 @10:55PM (#18530938)
Ok, plugins/mods for real time applications are a good use case. Not only games, but also databases, web servers, etc.

I'm starting to see the value in using WebAssembly outside the browser.