Hacker News new | ask | show | jobs
by AnIdiotOnTheNet 2646 days ago
I think the browser shouldn't be a platform at all, frankly, and WASI is one possible way we can finally stop trying to shoehorn it into being one. If everything runs a WASI runtime, which is designed to run applications from the ground up, there really isn't any need for the browser to run applications anymore, is there?
6 comments

I think the world in which the browser disappears and all we have is apps is a worse world than the one we have now.

With HTML/CSS we get the relatively easy ability to add extensions to dig deep into the data of a page. One of my favorite extensions is rikaikun which adds popup translation of Japanese words. It can only do this because it can inspect a standardized data structure (the DOM) with standardized APIs.

I also love the ad blockers. They let me not only block ads but also hide parts of websites I find distracting. For example I hide the "Hot posts from other stack exchange sites" section of stack overflow because I find I get sucked into 20-40-60 minute distractions if I don't hide it.

I can also copy and paste nearly any content and link to almost any content.

An a world of native apps none of this is really possible. Every native app will use its own internal representations of data. Different UI kits or libraries. Much of it is un-linkable, un-copyable, It drives me nuts when I can't copy and paste of phone number, or address in a native app.

I don't believe getting rid of the web for a WASI based app world would be a good thing for users.

PS: I think WASI is a great idea. I just think trying to replace HTML based apps with WebAssembly apps using WASI and rendering with WebGPU is the wrong direction for most web apps.

What you’ve mentioned about HTML/CSS is true for native apps too: there is a standardized API for drawing the UI (GTK+, Cocoa, whatever Windows has) and standardized data formats that back them. The issue is that apps are not necessarily required to use these (ironically it’s Electron et al. that break these) and they don’t use code that is readily inspectable, unlike pure JavaScript. On the other hand, though, this has been slowly been becoming true of the modern web: websites are ditching the DOM for React/Vue/Angular “SPAs” that use horrible selector names and minimized and nigh-impossible to comprehend JavaScript so they can reimplement things that the platform provides for free. So it’s not great either way…
> there really isn't any need for the browser to run applications anymore, is there?

Of course there is. You can open a new "application" without installing, just by clicking a link or entering a URL. The beauty of browser as a platform is simplicity of navigation between apps you haven't previously installed.

Also, note that the distinction between a document and an application is vague. Is interactive document, perhaps containing an interactive map, an application? If yes, do you really want to install these interactive documents before accessing them?

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?
How?
That's like saying "now that we have Minix there isn't any need for Windows anymore". WASI is awesome, but the Web is here to stay.
For sure, but it would be nice if there were alternative ways to run "no-need-to-install" apps without bringing all the weight of a browser with it. There's a large class of apps that don't need to link out to other URLs, don't need CSS engines (if they just need opengl/vulkan for example), and might not need as strict of security as a web page.
> There's a large class of apps that don't need to link out to other URLs, don't need CSS engines (if they just need opengl/vulkan for example), and might not need as strict of security as a web page.

Yes, there are, and those uses are already solved with Steam, the Windows Store, Play Store, App Store, etc....

"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. WASI does not appear to be doing anything interesting, new, or novel here.

Which nonproprietary plattform can I use today, to reach the widest audience?
From reading your other comment "you can pull things over a network without a web browser...", your argument appears to be: we could have a separate platform from the browser for running web applications, and lose the need for the browser to support applications. Correct me if I misunderstood.

A benefit of applications in the browser is that they share and benefit from the same security policy decisions which are made for web pages. I think the closest thing to what you're suggesting is mobile apps, which don't always compare favourably. Users are often coerced into giving up unnecessary permissions, and they have less control over the user experience (can't block ads or change styles).

> we could have a separate platform from the browser for running web applications, and lose the need for the browser to support applications.

Yes. And the benefit of that is that it building a new WASI implementation is almost certainly going to be much easier than building a new web browser currently is. If web browsers were to revert to being simple hypertext renderers, then those would be orders of magnitude easier to implement as well.

> Users are often coerced into giving up unnecessary permissions

How is that different from the web?

> and they have less control over the user experience (can't block ads or change styles).

If I have control over who the WASI VM can and cannot talk to, I can block ads using exactly the same mechanism that is used today. Styling would depend on precisely what interface ends up in common use to render graphics for WASI applications, it is totally possible to style native widgets or something like QT/GTK. You can't style anything that uses a canvas regardless.

So every web site you visit now balloons to 150MB of code that just badly reinvents what Chrome & Firefox did? And also just runs with, what, all permissions & capabilities? Or no permissions? GPU, video, audio, etc... are all just not allowed then?
Yeah, sure, you go ahead and reinvent 30 years of cross-platform application APIs. I'll keep using the web until your new ones match maturity.
We have had dozens of cross-platform application APIs running in VM sandboxes, yet the browser is intent on slowly reinventing them anyway.
Eh, I'm not trying to discourage you from building cool apps on top of WASI. I just hope you understand what you're up against. And most of it is not technical; you've got to convince Apple to include a WASI runtime on iOS (among others).
Just like any new feature added to the web standard requires that Apple actually implement it in Safari, right?

I'm not really pro-WASI so much as I am against the idea that the browser is a good application platform.

Right, just like that. They are totally comparable, adding a new feature to an existing runtime is just as hard to convince as adding a new runtime itself. Totally comparable.
My understanding is that Apple still doesn't implement some new web standards, so yeah actually.

Ultimately, if a vendor refuses to support something, it doesn't matter if it is an 'open standard' or not. The openness means absolutely nothing in this instance.