Live data from Hacker News

Standardizing WASI: A system interface to run WebAssembly outside the web

hacks.mozilla.org

91–100 of 238 posts

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#92

Earlier quoted context omitted.

OK, that's all correct and valid. Java still exists and is a valid deployment platform. Why is WebAssembly outside of the browser needed?

Using Oracle's Java Programming Language is an immeasurable legal liability.

There are open source and non-Oracle Java virtual machines you can buy support from if Oracle isn't your cup of tea.

It's not really a legal liability either. Lawyers for companies who use Java go over those agreements with a fine tooth comb and approve them before they're signed. There are no surprises (if your attorneys aren't frauds.)

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#93

ok, so I hate to be this guy and I'm going to do it anyway because it has to be said: Did they just invent Java again? Aren't they promising what Java promised? Won't they hit the same problems that Java hits during its write-one-run-anywhere promises? I'm asking honestly - why is WebAssembly outside of the browser needed?

Targeting the JVM (or the CLR) requires that your language work nicely in the Java (or C#) memory model.

This basically means your language needs to work nicely with stop the world garbage collection.

(And yes, I know that modern garbage collectors aren't really stop the world, but the tradeoffs are still there.)

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#94

Excuse me if I come across as naive, I'm kind of a noob on these architectural topics, but how is this different/better than what the JVM is/accomplishes? When WASM first popped up I thought about the similarities with Java Web Applets and Flash.

Among other things, Oracle has been… not very friendly to people and organisations working with the JVM[1]. A standard with many implementations that isn't controlled by one corporation is desirable. With that said, I kind of wish that this standard was RISC-V, but I guess it doesn't work that well for virtual machines?

[1]: https://en.wikipedia.org/wiki/Oracle_America,_Inc._v._Google....

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#95

Earlier quoted context omitted.

OK you answered a few of my questions and I still don't see why WASM is a requirement for any of this to happen. No matter what language I use, no matter what platform I deploy to, if I want to interact with a service or with infrastructure, I'm going to have to use the provided API(s), WASM included. If I deploy a pre-compiled binary to an AWS Lambda and an Azure Function, and it works on both, it's because I had to…

Look at it this way, this won't cause any harm and there's some chance that it will develop into something useful and successful. Right now there's no reason to conclude that this will turn into something that's no better than Java.

Has a single sandbox ever been written that has not had an escape vulnerability? I don't know of any. Sandboxes aren't safe, and everyone thinks of them as being a perfect prophylactic when they provably, demonstrably, and historically are not, in any way.

the solution is not to create another sandbox to run software in.

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#96

Earlier quoted context omitted.

OK you answered a few of my questions and I still don't see why WASM is a requirement for any of this to happen. No matter what language I use, no matter what platform I deploy to, if I want to interact with a service or with infrastructure, I'm going to have to use the provided API(s), WASM included. If I deploy a pre-compiled binary to an AWS Lambda and an Azure Function, and it works on both, it's because I had to…

> OK you answered a few of my questions and I still don't see why WASM is a requirement for any of this to happen. It's _not_ a requirement, but at least to me it seems like a pretty good _possible_ solution. I sense you're pretty jaded about web development, and I get that, but I don't agree this is "web people" trying to do things outside the browser, but rather I see it more as "systems people" trying to bring _so…

I don't think that web technologies are going to be a good solution to anything that is not the web.

The web development community haven't even solved their own problem space very well; spreading to new problem spaces will likely not suit them as much as they believe it will.

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#97
post #91

Wait a second... I thought Java was supposed to do this with the JVM... I thought .Net was supposed to do this with the CLR... What's different now?

Different use cases. You don't necessarily want a 10 ton standard library for every use case, like on embedded devices or plugins for a software package. C/C++/Rust being 1st class citizens is also very useful.

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#98
post #91

Wait a second... I thought Java was supposed to do this with the JVM... I thought .Net was supposed to do this with the CLR... What's different now?

Now it's got JavaScript in the mix ;) but honestly I can't tell either.

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#99
post #97
post #91

Wait a second... I thought Java was supposed to do this with the JVM... I thought .Net was supposed to do this with the CLR... What's different now?

Different use cases. You don't necessarily want a 10 ton standard library for every use case, like on embedded devices or plugins for a software package. C/C++/Rust being 1st class citizens is also very useful.

Standard libraries are what make languages useable. In my experience there's a solid case to be made for a 10-ton standard library (for targets with an operating system) or basically none whatsoever (for embedded). A thin standard library is always going to be too small to do useful things easily at the high level and too big to be deployed on an embedded system. Rust is good because it can play in both sandboxes.

Re: Standardizing WASI: A system interface to run WebAssembly outside the web

#100
post #91

Wait a second... I thought Java was supposed to do this with the JVM... I thought .Net was supposed to do this with the CLR... What's different now?

A decade and change has passed, so we get to do it against a new set of I/O concepts and performance concerns. Those are always the factors motivating new software standards.

I did evaluate WASM as a native runtime environment recently, pre-WASI. If what you're doing can coexist with memory mapped I/O, you don't have to have an explicit interface of this type, you can just say "lower region of linear memory is where the I/O goes" and hardcode all APIs against that. It's more "honest" in certain ways than a syscall interface since it doesn't lead to any parsing of intent or variable expectations around resource usage.

Post reply on HN