Live data from Hacker News

The Road to the WASM Component Model 1.0

bytecodealliance.org

81–90 of 111 posts

Re: The Road to the WASM Component Model 1.0

#81
post #65
post #45

Earlier quoted context omitted.

Sorry but how exactly does the sandboxing help? You download and run an app that you expect to be useful and that you need. The app needs permission to access your data. If you want to use the application what choice do you have except to grant it access? Point being you wouldn't run untrusted code in the first place and for "trusted code" you end up accepting it's access requirements anyway. So logically I'd think t…

> The app needs permission to access your data. If you want to use the application what choice do you have except to grant it access? But it doesn't need network access to be useful, so it doesn't have that permission and can't exfiltrate your data?

https://learn.microsoft.com/en-us/windows/security/applicati...

Re: The Road to the WASM Component Model 1.0

#82
post #81
post #65

Earlier quoted context omitted.

> The app needs permission to access your data. If you want to use the application what choice do you have except to grant it access? But it doesn't need network access to be useful, so it doesn't have that permission and can't exfiltrate your data?

https://learn.microsoft.com/en-us/windows/security/applicati...

In general, what's three point of a link to a sandbox in a conversation about the benefits of sanboxingm

But specifically, this sandbox also kills all interop with your system, other apps/utilities, so way too disruptive for the purpose of isolating just from the network.

Re: The Road to the WASM Component Model 1.0

#83
post #75
post #42

Earlier quoted context omitted.

We had that in the 90's with Java. Why would this approach succeed today?

Because Java is a language, not a compilation target?

From the introduction section of the Java specification [1]:

"The Java Virtual Machine is the cornerstone of the Java platform. It is the component of the technology responsible for its hardware- and operating system-independence, the small size of its compiled code, and its ability to protect users from malicious programs."

[1] https://docs.oracle.com/javase/specs/jvms/se26/html/jvms-1.h...

Re: The Road to the WASM Component Model 1.0

#84

Earlier quoted context omitted.

Why not just run a vm?

Far more overhead.

In particular (as I just learned when looking it up), WASM can dynamically allocate host memory with the memory.grow instruction, so you don't have to waste a huge chunk of statically allocated memory per VM: https://developer.mozilla.org/en-US/docs/WebAssembly/Referen...

Although... it doesn't say anything about releasing memory back to the host (I don't see a memory.shrink instruction) so maybe it's not all that helpful? Will WASM applications continue hogging the maximum amount of memory they've ever used until they're restarted?

A VM could release memory back to the host using memory ballooning, but this has to be managed manually somehow, at least with QEMU.

Re: The Road to the WASM Component Model 1.0

#85
post #73
post #69

Earlier quoted context omitted.

Asking for 0% js 100% wasm website is like wanting a C-free linux distro

One could write a js-less DOM impl I think.. neither Chrome nor Firefox itself is written in js unlike big parts of Linux that are indeed written in C. Explorer shipped with vbscript as a language that can manipulate the DOM. The really big issue in this case is network effect, which is why I hope something can come out from the momentum building behind WASM.

One couldn't, because you'd need to standardize a JS-less DOM, which requires one to persuade Apple, Google, Microsoft, and Mozilla to agree on a new standard for a JS-less DOM API.

The DOM API is currently defined as a JS API, including JS strings, JS objects + properties, JS Exceptions, JS Promises, JS garbage collection, and on and on and on.

The effort to get all the browsers to agree to standardize a new JS-less DOM API would take years; none of the browser vendors even want to begin that conversation today.

Re: The Road to the WASM Component Model 1.0

#86
post #82
post #81

Earlier quoted context omitted.

https://learn.microsoft.com/en-us/windows/security/applicati...

In general, what's three point of a link to a sandbox in a conversation about the benefits of sanboxingm But specifically, this sandbox also kills all interop with your system, other apps/utilities, so way too disruptive for the purpose of isolating just from the network.

Just like any WebAssembly runtime, without imports of external functions, the code can only warm CPUs.

Re: The Road to the WASM Component Model 1.0

#87
post #86
post #82

Earlier quoted context omitted.

In general, what's three point of a link to a sandbox in a conversation about the benefits of sanboxingm But specifically, this sandbox also kills all interop with your system, other apps/utilities, so way too disruptive for the purpose of isolating just from the network.

Just like any WebAssembly runtime, without imports of external functions, the code can only warm CPUs.

So? Will they not have imports of external functions?

Re: The Road to the WASM Component Model 1.0

#88
post #42

Earlier quoted context omitted.

Use cases I am more excited about: 1) Replace webhooks in web apps with wasm binaries provided by the customer, but that run in the web app servers. 2) Safer plugin system for professional software (plugins for photoshop, plugins for IDEs, etc) 3) Safer mod system for games and server-side mods that run on the game-maker server.

We had that in the 90's with Java. Why would this approach succeed today?

WASM sandbox is miles better than the JVM

WASI is a standard on where to poke holes on the sandbox for your specific use-case

WASM+WASI as a compilation target allows any program written for modern operating systems to work on any WASM runtime

Re: The Road to the WASM Component Model 1.0

#89
post #87
post #86

Earlier quoted context omitted.

Just like any WebAssembly runtime, without imports of external functions, the code can only warm CPUs.

So? Will they not have imports of external functions?

The point being that WASM doesn't improve anything over sandoxing native applications, on the OSes that actually are serious about it.

It should confine itself as the evolution from browser plugins.

Re: The Road to the WASM Component Model 1.0

#90
post #83
post #75

Earlier quoted context omitted.

Because Java is a language, not a compilation target?

From the introduction section of the Java specification [1]: "The Java Virtual Machine is the cornerstone of the Java platform. It is the component of the technology responsible for its hardware- and operating system-independence, the small size of its compiled code, and its ability to protect users from malicious programs." [1] https://docs.oracle.com/javase/specs/jvms/se26/html/jvms-1.h...

From the same link, opening sentence:

"The Java® programming language is a general-purpose, concurrent, object-oriented language."

Edit: Having thought a little, I appreciate that it's possible to compile for the JVM from source code which is not Java, which makes the JVM a compilation target. As far as I'm aware the JVM doesn't have first class support for this though, It's been tacked on as an afterthought. Compiling C to JVM bytecode for example doesn't appear to be an enjoyable process. WASM on the other hand was designed explicity to function as a compilation target for arbitrary languages.

Maybe I'm missing something, happy to be proven wrong.

Post reply on HN