Hacker News new | ask | show | jobs
by dartos 806 days ago
When I’ve tried writing programs targeting wasm (in assemblyscript and rust) and platforms for them to run on, special care had to be taken to treat each language differently (how they encode strings differently for example.)

This means that not only do I need to take special care that my code can compile to wasm, but the platform devs (also me, in this case) needs to take special care to support a variety of different design choices in various wasm toolchains.

I’d rather just use SELinux containers and let the OS handle security.

Maybe Firecracker VMs like AWS lambda does.

1 comments

That's of course an option if you're fine with your deployables being architecture- and OS-dependent, and very often that's the case.

But for when it's not, I think a platform-independent and language-agnostic bytecode standard is a valuable thing to have.

In the extreme scenario where you want to run arbitrary untrusted code on arbitrary machines, that would be useful, but wasm isn’t a solution for that.

If I need to specifically support how certain languages compile to wasm (meaning I don’t support arbitrary wasm) then what’s the point?

It’s just Java applets again.