Ask HN: Why don't browsers load websites directly in WASM?

3 FerkiHN 11 7/8/2025, 9:31:14 AM
I've been wondering — modern browsers are optimized to parse and run HTML, CSS, and JavaScript. But what if a browser was built to load and run websites written directly in WebAssembly?

Wouldn’t this improve performance, startup speed, and reduce overhead from parsing multiple formats? Why hasn't anyone created a browser where the default language for sites is WASM?

Is it a technical limitation, security concern, or just lack of interest from the ecosystem?

I’d love to hear what the HN community thinks.

Comments (11)

FerkiHN · 12h ago
I'm still exploring this idea and I know it's far from perfect, but I posted it here because HN is a great place for constructive feedback.

If this concept sounds interesting to you — even if you think it's flawed — I’d love to hear how you would improve or reshape it. Maybe there’s a better way to approach it, or a different angle I haven’t considered.

Feel free to break it down, challenge it, or build on it. That's exactly what I'm here for

mmarian · 11h ago
Check Blazor WebAssembly: https://learn.microsoft.com/en-us/aspnet/core/blazor/hosting...

From memory, initial page load times are slower

palmfacehn · 11h ago
high_na_euv · 12h ago
Wasm as replacement for css and HTML? Thats what are you asking about?
mb2100 · 12h ago
This. WASM may be a replacement for JavaScript, but what about HTML, CSS and the DOM?

If you want to know what WASM is actually a good fit for and what not, see https://queue.acm.org/detail.cfm?id=3746171

FerkiHN · 11h ago
Thank you!
FerkiHN · 12h ago
Not quite — I'm not saying we should replace everything like HTML or CSS, but I'm exploring the idea of a browser that can load and run full sites or apps written entirely in WASM.

Like how operating systems run .exe or ELF binaries — what if a browser did the same but with .wasm? Maybe not for regular documents, but for apps/games/tools where you want full control, performance, and custom UI rendering without relying on the traditional web stack.

Just brainstorming, I’m curious what others think.

magicalhippo · 11h ago
Do you mean building the page via DOM manipulation using WASM? So the browser loads an empty page, and the WASM generates the page by calling createTextNode() and such?
mb2100 · 12h ago
modern OSes also come with a windowing system and GUI apis. And even terminals have a stdin/stdout. You'd need some kind of interface to interact with the world.
FerkiHN · 12h ago
Please share your opinion.
theworIdismine · 9h ago
i don't think you understand what wasm does. it cannot substitute html because wasm and html do completely different things!! the web is not just about speed, people buy things because they are pretty too, not just because they are useful. if you need speed, you download a program.

and if you are passing your words through a llm before submitting them here, please stop, i'd rather see honest yet broken english