Hacker News new | past | comments | ask | show | jobs | submit login

Write websites with Wasm, render UI with WebGL or something similar. Implement JavaScript as a compiler to Wasm (which runs on Wasmitself), implement HTML+CSS renderer as a library which runs on Wasm as well. So basically your browser need to implement Wasm and WebGL which sounds reasonable task. Well, that's simplification, of course, it need to implement some HTTP API like XMLHttpRequest, local storage API and so on, but it's manageable.

Here's an example of website written with Rust and rendering all UI to canvas: https://makepad.github.io/makepad/ it works right now and it's very fast and smooth.

IMO tech for next generation web apps is already here and it's great.




Implementing an html rendered that is compatible with all the css rules and it also implements all the extra workarounds that the current browser implement ( like handling illegal markup is not trivial) markup . I mean think about it, you hit invalid html markup and what do you do? You need to continue but now you need to check what Firefox or Chrome do for each case (missing end tags , P inside span, weird nesting of elements ) I would not want to implement a browser that is compatible with the current garbage.

There was also an article earlier this month or previous month from a Firefox developer about font/text rendering, in case you missed it rendering text in a way that works with all writing system is super hard.


Just compile Firefox or Chromium to Wasm and provide necessary adapters.

Well, I'm joking, of course, it's not that simple. But it should be possible in the end.


The point was to reimplement a browser. Imagine you want to make an ebook reader,this device needs not to eat too much batteries so you want to implement a basic css and html renderer not to re-skin Chrome.

Some ebook publishing platforms will perform checks and reject your epub(mobi or similar format) if is not respecting some strict rules, this makes it a pain if you have random html that works on web but you want to package it as epub because now you need to find all the bugs(or similar stupid DOM elements) and fix them as best you can.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: