3 ms·
Ask HN: Why don't browsers load websites directly in WASM?
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.
- FerkiHN 1y agoPlease share your opinion.
- FerkiHN 1y agoI'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
- high_na_euv 1y agoWasm as replacement for css and HTML? Thats what are you asking about?
- FerkiHN 1y agoNot 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.
- mb2100 1y agomodern 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.
- magicalhippo 1y agoDo 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?
- deleted 1y ago[deleted]
- mb2100 1y agoThis. 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 https://queue.acm.org/detail.cfm?id=3746171
- FerkiHN 1y agoThank you!
- palmfacehn 1y agoHere are two approaches: https://github.com/yewstack/yew https://github.com/yewstack/yew https://www.egui.rs/#demo https://www.egui.rs/#demo
- mmarian 1y agoCheck Blazor WebAssembly: https://learn.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-9.0#blazor-webassembly https://learn.microsoft.com/en-us/aspnet/core/blazor/hosting... From memory, initial page load times are slower
- theworIdismine 1y agoi 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
- breve 1y agoAvalonia is an example: https://avaloniaui.net/ https://avaloniaui.net/ Here are some Avalonia WebAssembly demos: - https://solitaire.xaml.live/ https://solitaire.xaml.live/ - https://bandysc.github.io/AvaloniaVisualBasic6/ https://bandysc.github.io/AvaloniaVisualBasic6/ - https://eremex.github.io/controls-demo/ https://eremex.github.io/controls-demo/ Uno is a similar idea: https://platform.uno/ https://platform.uno/