Kosmonaut: web browser from scratch in Rust
I just had an interesting train of thought. People have assumed for some time now that writing a browser engine from scratch is intractable because of how large and complex web standards have become.<p>But what if you didn&#x27;t have to implement all of them?<p>Now, some people would suggest we jettison JavaScript and&#x2F;or CSS entirely. Or at least all of the additions made to them over the past decade. I think the idea that a browser like this would gain <i>any</i> traction outside of hardcore enthusiast circles is pure delusion.<p>Instead, what if features were prioritized based on how much of the web uses them? I&#x27;d bet that 90% of the web only uses 50% of the web standards out there. Some things like Flexbox are used on practically every new site that gets built these days. But there are dozens of obscure CSS properties that most web developers probably don&#x27;t even <i>know</i> about, much less use. And JavaScript APIs? There&#x27;s a host of bespoke progressive-web-app APIs (USB access, anyone?) that hardly anybody uses.<p>Also, a huge part of the web&#x27;s baggage is maintaining backwards-compatibility with the entire history of content. This is well and good, but not an ideal that an indie browser could afford to uphold. Frames, image area tags, etc. There&#x27;s probably a long tail of features - many of them deprecated - that could be jettisoned without having much impact on the average user&#x27;s experience. Even things like &quot;float&quot;, which aren&#x27;t deprecated, may have been instrumental at one point but are no longer very important.<p>Prioritizing the standards that matter and de-prioritizing the ones that don&#x27;t could dramatically cut down on the effort necessary for an MVP.<p>Taking this further: how do we know which features to prioritize? Most front-end devs probably have a rough idea, but what if we got empirical with it? What if we automatically tested the top 10,000 websites or something and made note of which CSS properties they used, which JavaScript APIs they called out to, and ranked them by frequency (and by popularity of the site?). We could chart a clear, direct path toward &quot;what does it take for a browser to be useful in 2020?&quot;<p>It&#x27;s possible this browser could even include existing JavaScript polyfills (<a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Glossary&#x2F;Polyfill" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Glossary&#x2F;Polyfill</a>) to help bridge the gap for things that it hasn&#x27;t yet implemented. Leaning on work that&#x27;s already been done by the open-source community.