Um, reading this Wikipedia article, it sounds like the webdev community is just walking backwards into inventing virtual machines.

Like it's one thing if it's designed for JavaScript, or is a sandboxed virtual machine.. But they're saying normally it's C++ and Go that is used to compile to wasm, and they had to create a new language for JS devs to take part.

And then it's going to have access to system calls and OS functions? Wouldn't this be another privileged VM with security issues? If this is the case, then why didn't they make a new VM platform in the first place. It's like since everyone has a browser installed, they're smuggling a new VM platform through it so no one has to explicitly download...

· · Web · 4 · 3 · 4

@snowyfox let's see if I understand it:
- add JS to webs
- bloat those webs so they become slow
- make JIT compilers for JS
- bloat even more those webs so they become slower
- make a VM for JS to speed things up a little.

MAYBE the solution could be to "debloat" those webs and stop using megabytes or code just to see a photo instead of using a simple tag from decades ago. I wouldn't call it a VM, i would say it is more like the relationship between numpy and python. e.g. i don't think wasm is going to get to read files straight from disk, it has to go through whatever web apis there are for files

i think a few benefits come from having established low-level libraries for audio/video manipulation and then just cross compiling them over to wasm

@snowyfox how would it have access to system calls and functions?

as far as i know, wasm was originally created as a replacement for asm.js and nacl. those were used to compile c/++ programs and embed them in web apps, for both speed and code reuse. those programs were mostly about expensive computation, so there was no need to add syscalls — just export the computation function and call it from js.


@snowyfox like e. g. cryptography or 3d games for webgl

but then people started doing all kinds of things, like porting qt apps onto the web, writing web apps in rust, etc. and made wasm because it's better than asm.js and nacl.

so now everyone wants to be able to call native js apis from their favorite language and write web apps in it. which is like a very complicated issue because of how memory management and typings work differently between wasm and js.


@snowyfox it might be added anyways, just because it's a popular demand and people don't like using js wrappers like they do now

but how would it get access to native system calls? not like js has them...

i guess there're initiatives for making wasm execution environments for server apps and such, because wasm is now widely supported, is easier to work with than e. g. docker and patent free unlike jvm. but that's separate from the browser.


Sign in to participate in the conversation
Serenity Laboratories

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!