Live data from Hacker News

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

hacks.mozilla.org

191–200 of 238 posts

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

#191
post #132
post #130

Earlier quoted context omitted.

Yeah, Managed C++ and C++/CLI don't exist.

I was careful to say "unmodified." C++/CLI is hardly that. It's also not at all sandboxed the way wasm is. Why the chip on the shoulder?

You're conflating C++/CLI with the MSVC /clr compiler switch. They're distinct.

With /clr:pure (which produces CIL only, although it is allowed to use memory-unsafe features like pointers), the entirety of ISO C90 is supported on CLR, with the sole exception of setjmp/longjmp.

C++/CLI adds language extensions that allow one to interact with the CLR object model from C++ code. It is only needed if you need to call into the .NET standard library, or other managed libraries - i.e. if your C code is not portable to begin with.

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

#192
post #87

Earlier quoted context omitted.

Except entirely irrelevant as WASM is not Javascript.

Sure, though it’s still a web technology taking over an otherwise unrelated space ¯\_(ツ)_/¯

I don't think it's unrelated. Despite the name, WASM isn't really a "web technology" - it's a sandbox technology and a compile-once-run-everywhere technology, and there has always been demand for that outside the web, even before the web existed. It might be that the web is what created enough demand for it to happen in the end, but what do we care?

The problem with JS was never that it's a web technology. It's that it's a bad technology that happened to be in the wrong place at the wrong time to get a first mover advantage.

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

#193

Earlier quoted context omitted.

I can't shake the niggling idea that this, just like node before it, is more or less a way for JS web devs to not have to leave the ecosystem they're comfortable with and learn a new language. We already have hundreds of ways to write native UI applications, but web devs can't bother to use them.

Couldn't a native developer also take advantage of wasm/wasi to build their native application to a single build target/binary, which could then be run on Any machine?

Cross platform is in no way new. There are already plenty of ways for native devs to target multiple platforms at once if that's required.

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

#194

Earlier quoted context omitted.

Why would you have to install a wasm/wasi binary? You can pull things over a network without a web browser you know.

the horror of Java web start comes to mind, and its resulting failure as well.

Why do you think it failed, and how many of those same reasons are applicable here?

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

#195
post #97

Earlier quoted context omitted.

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.

.NET's '10 tonne' standard library is a decent part of what makes it so usable. And it's not exactly massive either - I can publish a standalone .NET Core app that's only around 30MB in size. For the usability and GC, I'll take that over C any day.

> I can publish a standalone .NET Core app that's only around 30MB in size.

Honestly, it shouldn't need to be that big. There's plenty of cruft even in .NET core.

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

#196
This technology will become more compelling once there is a deployment target that runs WASM+WASI binaries but won't run native binaries.

Nothing like that exists (it's too early) but it would be interesting to know if anyone is planning anything.

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

#197

Earlier quoted context omitted.

"Steam, the Windows Store, Play Store, App Store, etc...." And there's also your answer. All those are fragmented, proprietary plattforms. WASI is not.

No, they aren't. They are a variety of distribution mechanisms, which WASI is not and does not contain. Also, WASI is literally fragmented by design. It does not have a singular target, it instead is a bunch of modules (aka, shared libraries), and what modules you get and how they behave is up to the platform. Real native has already long since solved distribution, dependency management, and portable abstractions. WA…

Which nonproprietary plattform can I use today, to reach the widest audience?

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

#198
post #77

Earlier quoted context omitted.

Signed types and a proper cross language target. There is very little technical difference between the two, esp now that GraalVM has shipped. WASM is now the portable executable standard. https://www.graalvm.org/

I'm sure this was meant to say unsigned types - Java only uses signed types.

Correct, my mistake. unsigned types.

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

#199

Earlier quoted context omitted.

Couldn't a native developer also take advantage of wasm/wasi to build their native application to a single build target/binary, which could then be run on Any machine?

Cross platform is in no way new. There are already plenty of ways for native devs to target multiple platforms at once if that's required.

But are any of those ways both at the assembly level (speed) and decoupled from the runtime (space)?

My takeaway from WASI is that it would allow for a single universal runtime with near-native execution. The near-native aspect being what other universal runtimes like the JVM and CLR lack due to their bundling of a GC and other non-essential features.

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

#200

Earlier quoted context omitted.

you can use html/css/js with it, I guess :/ Or, more accurately, its easy to make UIs for it? I'm personally bearish on the whole idea from a community / technical standpoint (in that I'd like us to return to more native stuff than follow JS into the browser), but I can't argue that WASM and co won't enable some really cool uses.

I can't shake the niggling idea that this, just like node before it, is more or less a way for JS web devs to not have to leave the ecosystem they're comfortable with and learn a new language. We already have hundreds of ways to write native UI applications, but web devs can't bother to use them.

All the ways we have to write native UI applications aren't exactly great though, and most aren't cross platform.

Node always struck me as a strange trend but using web tech for UIs seems like a good fit for a lot of cases

Post reply on HN