Hacker News new | ask | show | jobs
by spankalee 503 days ago
I've long thought its killer feature would be embeddable cross-platform UI and native-wrapped web apps like Electron and Capacitor. For these cases it doesn't need to render the entire public web, but the subset used by the application developers. It's a much more tractable problem.

Chrome had a project a long time ago called Razor whose goal was to make a 120fps streamlined subset of the web platform for those types of use cases. They tried to throw away warts of the web that slowed down parsing and rendering like quirks modes, floats, negative margins, infinite entity expansion, element adoption, and probably most built-in elements, leaving a few core built-ins and custom elements.

Razor apps could have run on the web, and in a Razor runtime. Unfortunately, IMO, they kept removing things until they removed the document, and swapped in Dart for JS and the project became Flutter which is not very web-like at all.

I thought Razor was a neat idea, and Servo could really fill that space well.

4 comments

Fascinating, and I’ve been working on a native UI project I call Figuro for a couple of years now (1) that’s built on the idea of simple nodes.

It’s surprising how similar to HTML it’s becoming. I feel like it's sorta an inverse of the Flutter story. Lately I’m working on adding a subset of CSS. Adding padding and margins too seems like a good idea too, etc. Part of me wonders how much of a webpage I could render with it.

1: https://github.com/elcritch/figuro

Yes this is the ideal space for a performance minded web rendering engine rewrite.

And if you do it well enough as a subset it can become the next standard where the modern web is just the subset, you can even integrate it with a legacy render where you fall back to legacy when you detect you cant handle it, and have the fast path for the subset.

Didn’t realize that was the backstory of Flutter, I thought this was headed in a different direction.

I heard the YouTube team did something similar for their embedded / resource-constrained environments where the client just renders barebones HTML/JS and only what is needed is implemented in the engine.

Yeah, YouTube has minimal engine called Cobalt: https://developers.google.com/youtube/cobalt

That's also an unfortunate story, because they've really lagged on adding features in the past because they generally have no way to update the engine on TVs. So any new feature would take 5-10 years to be usable.

So almost 10 years ago they didn't invest in some core things like web components, and they could have used them by now if they did.

Another similar project (alpha stage): https://github.com/DioxusLabs/blitz

And another (mature but proprietary): https://sciter.com/