Remix.run Logo
stackghost 4 days ago

Honest question: Can someone explain to me why people are excited about WebGPU and WASM and similar technologies?

To me, one of the greatest things about the web is that the DOM is malleable in that you can right click -> view source -> change things. This is dead in an era where the server just sends you a compiled WASM dll.

It seems to me that the inevitable result of things like WASM and WebGPU will be "rich media web 4.0 applications" that are just DRM, crypto miners, and spyware compiled so that they're more difficult to circumvent, and delivered via the browser. An excuse to write web apps with poor performance because "well the user just needs a stronger GPU". It seems like an express train back to the bad old days of every website being written in flash.

I honestly cannot see the upsides of these technologies. Is it gaming? Why would I want to play a 3D game in my fucking browser of all places? That's a strict downgrade in almost every way I can think of. Why would anyone want that? Is it "AI"? Why would I want to run an LLM in the browser, I could just run it natively for better performance?

All I can see and have seen over the last several years is a steady parade of new technologies that will make the internet (and in some cases the lives of every day people) objectively worse while enriching a handful of big tech douchebags.

Why are we going down this path? Who is asking for this stuff? Why the fuck would I want to expose my GPU to a website?

Flux159 4 days ago | parent | next [-]

> Why would I want to play a 3D game in my fucking browser of all places?

To provide users a way to instantly play a game without having to download all assets at once. Give developers a potential way to avoid app store royalties of up to 30% on desktop or mobile. With wgpu in rust, you can also target WebGPU as a shared 3d runtime that will run across OS's natively rather than having to target Vulkan, Metal, and DirectX.

> Why would I want to run an LLM in the browser, I could just run it natively for better performance?

What about users who don't know how to download a model and run it locally? I would argue this is the vast majority of users in the world. Also, this specific use case is probably not going to be generalized with WebGPU yet due to model sizes, but rather other APIs like the Prompt API in Chrome which will use Gemini Nano embedded into the browser (assume it will eventually get standardized). https://developer.chrome.com/docs/ai/built-in-apis

I agree with you that WASM and WebGPU will be used for adware, targeting, and spyware - but if you don't want to use them, you should disable them in your browser settings - there's definitely value add for other users even if you can't see any benefits.

MindSpunk 4 days ago | parent | next [-]

Browsers will never run games that aren't toys or use very simple assets in a way that doesn't completely suck. High quality assets need gigabytes of data. You either require users to download all the assets upfront (the thing we're trying to avoid) or streaming the assets dynamically.

You end up having to re-implement steam to keep a local copy of the assets on the client device yourself, expect browsers to do the same to manage caching the gigabytes of data transparently, or design your game around a very slow storage device or use tiny assets.

Flash games worked because they fit very nicely into the 'tiny assets' category.

sroussey 3 days ago | parent | next [-]

PWA to cache everything locally?

iknowstuff a day ago | parent | prev [-]

Streaming assets seems reasonable.

stackghost 4 days ago | parent | prev | next [-]

>To provide users a way to instantly play a game without having to download all assets at once

There's a reason QuakeLive didn't catch on and it's because streaming resources to the player makes for awful UX.

>What about users who don't know how to download a model and run it locally?

Those users also don't know how to compile MS Word from source but they have been getting along just fine with installers.

dartos 4 days ago | parent [-]

The ability to paste a URL into a browser and have that be everything you need to do to play a game is pretty compelling for many kinds of games.

That’s what made flash games so big back in the day.

pjmlp 4 days ago | parent [-]

URLs can also be mapped into native applications, it is a matter of the right OS.

https://developer.android.com/training/app-links

dartos 4 days ago | parent [-]

That’s a different flow though.

Pasting URL into browser, then having access to game

Vs

Pasting url in browser Get link to install app Install app Navigate to the original url again.

Technical capabilities don’t always change user experience

pjmlp 4 days ago | parent [-]

Application streaming, no need for installation before using.

int0x29 3 days ago | parent [-]

That needs a hell of a lot of sandboxing before I get anywhere near it. Which sounds like a good use for WASM and WebGPU.

skydhash 4 days ago | parent | prev | next [-]

> To provide users a way to instantly play a game without having to download all assets at once

No need for the web in that case, which is inefficient. You can do with like those 1MB installers and stream those assets.

> but if you don't want to use them, you should disable them in your browser settings

Which the majority won't. People don't even go in their phone settings, apart from connecting to WiFi and changing their wallpaper.

zztop44 4 days ago | parent [-]

I don’t want to download a random executable from some unknown source. However, I trust the browser sandbox.

skydhash 4 days ago | parent | next [-]

> I don’t want to download a random executable from some unknown source

Why would you do that?

---

There's few applications that warrant having direct access to the GPU and other devices. And for those, a native app would be a much efficient way (for the user).

text0404 4 days ago | parent [-]

yeah but users don't care about technical efficiency, they care about having seamless experiences that aren't interrupted by long downloads, app/context switching, and loading screens.

skydhash 4 days ago | parent [-]

Which the web doesn't provide. Try opening Figma and Sketch at the same time or Mail.app and Gmail. Google Doc is closer to Wordpad than Libreoffice.

account42 18 hours ago | parent | prev [-]

I however don't trust the browser sandbox when it is continuously expanded with bloat that normal websites don't need.

pjmlp 4 days ago | parent | prev [-]

Application streaming sorts that out, with much better tooling for 3D development.

peutetre 4 days ago | parent | prev | next [-]

> Can someone explain to me why people are excited about WebGPU and WASM and similar technologies?

WebAssembly brings all languages to the browser. Why shouldn't I be able to use C#, Rust, Go, Dart, Python, or whatever else in browser?

WebAssembly brings better performance. That's what Webamp found: https://jordaneldredge.com/blog/speeding-up-winamps-music-vi...

And what Amazon found: https://www.amazon.science/blog/how-prime-video-updates-its-...

And what Google found: https://web.dev/case-studies/google-sheets-wasmgc

Why make things perform worse when they can perform better?

Why shouldn't I be able to make an application that compiles to the Windows, macOS, and Linux desktops and also to the browser? This one does: https://bandysc.github.io/AvaloniaVisualBasic6/

account42 18 hours ago | parent [-]

> WebAssembly brings all languages to the browser. Why shouldn't I be able to use C#, Rust, Go, Dart, Python, or whatever else in browser?

This has zero end-user benefit. While having the end-user drawbacks gp mentioned (reduced ability to inspect and modify content).

> WebAssembly brings better performance.

Wirth's law says "hold my beer".

dahart 4 days ago | parent | prev | next [-]

For that matter, why would you expose your CPU to a website? Or your monitor? It could show you anything! ;)

Maybe you are not be aware of the number of good web apps that use some WebGL under the hood? You might be using office applications in your browser already that use WebGL when it’s available, and the reason is it makes things faster, more responsive, more scalable, and more efficient. Same would go for WebGPU.

There’s no reason to imagine that the web will do bad things with your resources that you didn’t ask for and don’t have control over. There have been hiccups in the past, but they got fixed. Awareness is higher now, and if there are hiccups, they’ll get fixed.

stackghost 4 days ago | parent | next [-]

>There’s no reason to imagine that the web will do bad things with your resources that you didn’t ask for and don’t have control over.

The web is like this right now. Why would things magically become a utopia?

fulafel 4 days ago | parent | prev | next [-]

> There’s no reason to imagine that the web will do bad things with your resources that you didn’t ask for and don’t have control over.

Read some security update news from browser vendors and vulnerability researcher posts. There's some weak signals about vendors acknowledging the difficulty of securing the enormous attack surface of browsers built on unsafe foundations, eg MS "enhanced security mode" and Apple "lockdown mode".

skydhash 4 days ago | parent | prev [-]

I don't mind the browser using the GPU to speed up graphical operations. But I do mind random sites and apps going further than that. Native apps have better access, but there's an higher selection criteria than just opening a URL.

koolala 4 days ago | parent | prev | next [-]

It's interesting to me you don't like any WebGL websites. I remember first trying Minecraft Java in the browser and it was awesome.

Runescape! I grew up playing Runescape! How could anyone not want games like Runescape to exist?!?

jeroenhd 3 days ago | parent | next [-]

Last time I checked Runescape switched to a native client, too. And even in the browser back in the day it used to run absolutely terribly, so I hope we're not trying to replicate that experience.

bigstrat2003 3 days ago | parent | prev [-]

> How could anyone not want games like Runescape to exist?!?

I mean, I wouldn't say I don't want it to exist. But Runescape is one of the shittiest, most boring games I've ever played. It's not exactly a strong argument for why we should run stuff in the browser

bigstrat2003 3 days ago | parent | prev | next [-]

I agree. Trying to shove everything into the browser is absolutely stupid. Native apps are better than doing things in the browser in almost all cases. But that's not trendy, so people don't chase after it.

akira2501 3 days ago | parent | next [-]

> Native apps are better

Native operating systems are garbage at maintaining user privacy and become maintenance burdens when too many applications have been installed and even uninstalled on the machine.

While not perfect, a browser tab is a stronger sandbox than you can easily get in any other context.

encom 3 days ago | parent | prev [-]

We won't stop until the entire web has been enshittified.

do_not_redeem 4 days ago | parent | prev | next [-]

Why do you think wasm is harder to circumvent? The only way to instantiate a wasm module in the browser is through (drum roll) javascript. Install noscript if you're worried. The days of view source -> edit are basically over anyway due to every site's 1MB+ minified JS blobs.

> Why would I want to run an LLM in the browser, I could just run it natively for better performance?

Why would you try out a new app in a sandboxed browser, when instead you could give it complete access to your entire computer?

stackghost 4 days ago | parent [-]

If the app can run arbitrary code on my GPU it's not exactly sandboxed, is it?

do_not_redeem 4 days ago | parent [-]

Are you launching Chrome with --disable-gpu-sandbox? If not, it's sandboxed.

stackghost 4 days ago | parent [-]

If websites can run compute shaders on my hardware, that's not a sandbox.

crazygringo 4 days ago | parent | next [-]

Sandboxing is about preventing code from accessing data it's not supposed to. Data like files or memory belonging to other tabs or other processes. Or data streams like your webcam or microphone. Data outside of its, well, sandbox.

So how are compute shaders accessing data they're not supposed to? How do you think they're escaping the sandbox?

do_not_redeem 4 days ago | parent | prev | next [-]

It seems like you're just making up your own definitions now because you don't like the tech. What do think a sandbox is, exactly? And what do you think Chrome's GPU sandbox does, if it's not a sandbox?

jillyboel 3 days ago | parent | prev | next [-]

do you have a proof of concept that uses webgpu shaders to extract sensitive data?

stackghost 3 days ago | parent [-]

The search term you're looking for is "monero miner"

jillyboel 3 days ago | parent [-]

this exfiltrates data somehow? looking forward to the poc

tedunangst 4 days ago | parent | prev [-]

If websites can run JavaScript on your hardware, is that not sandboxed?

lukaqq 4 days ago | parent | prev | next [-]

You should try Chillin(https://chillin.online), browser-based video editor. Powered by WebGL, WASM, and WebCodecs, Chillin provides a full suite of video editing capabilities on the web. Trust me, Chillin is smoother than most native video editors, even on mobile. I believe Chillin can leverage WebGPU to bring even more powerful rendering features.

Yes, running LLMs on the web may not have significant advantages due to the speed limitations, but other models, such as those for bg removal, speech-to-subtitles, and translation, could become practical and efficient thanks to WebGPU.

01HNNWZ0MV43FF 4 days ago | parent | prev | next [-]

Users wanted an app sandbox.

HTML documents were sort-of like an app sandbox.

Evolution is now adding an app sandbox to HTML.

There is little we can do to resist it. I don't like it either - I hate HTML.

crabmusket 4 days ago | parent | prev | next [-]

Figma, my dude

stanleykm 4 days ago | parent | prev [-]

[flagged]