3 ms·
few stupid questions as always so that i can become a smarter person - what is the process of making a browser engine? what does the requirements look like -
by vivzkestrel 27d ago
few stupid questions as always so that i can become a smarter person
- what is the process of making a browser engine? what does the requirements look like
- how is an actual html, css and javascript speification implemented at the code level? are we painting an empty canvas or is it more complicated
- how is backward compatibility implemented?
- is all the code written in c++ or is it rust these days?
- how many people in a team do you need and how long would it take to write a browser engine from scratch
- what test cases do you consider for making something like this? how do you determine if you have handled all the outliers or not?
- how is mobile vs desktop handled at the browser engine code level?
- throwa356262 27d agoFor the first two, I highly suggest you watch a few of their videos from about a year ago.
- strangecasts 27d agoThe book Web Browser Engineering may be interesting: https://browser.engineering/ https://browser.engineering/ > - how many people in a team do you need and how long would it take to write a browser engine from scratch The boring not-really-an-answer is "it depends on which sites you want to render properly": a browser capable of rendering Hacker News is a perfectly fine one-person project (which the book would get you to), supporting things like banking and online mail requires not just developers but also people willing to "dogfood" test it as their daily browser
- nicoburns 26d ago> what is the process of making a browser engine? what does the requirements look like I second https://browser.engineering https://browser.engineering as a resource on that. Also consider dropping into the Servo Zulip. > how is an actual html, css and javascript specification implemented at the code level? are we painting an empty canvas or is it more complicated It's more complicated, but conceptually it's painting into an empty canvas > how is backward compatibility implemented? > what test cases do you consider for making something like this? how do you determine if you have handled all the outliers or not? The ~2 million Web Platform Tests https://github.com/web-platform-tests/wpt https://github.com/web-platform-tests/wpt. They also handle most of the backwards compatibility. The rest is engine developers manually comparing against each other's engines. > is all the code written in c++ or is it rust these days? There's still a lot of C++, but new code is increasingly Rust. To what degree varies by engine: Servo (and Blitz) are almost entirely Rust. Ladybird was 100% C++ in February, but is now 25% Rust. Firefox has significant and actively developed core components in Rust, but isn't actively converting more core modules. Chromium doesn't have any core components in Rust yet, but has invested heavily in converting foundational dependencies like FreeType and HarfBuzz to Rust. Safari is the outlier, I believe it doesn't use any Rust yet. > how many people in a team do you need and how long would it take to write a browser engine from scratch I've heard estimates that Chrome has a team of >1000, Firefox 500-800, Safari 100-200, Servo / Ladybird are more like 5-10. I've been building Blitz by myself for ~3 years. Something like 3-5 years is probably a minimum if you're truly building from scratch unless you have a really large team backing it, and depending on your success criteria. > how is mobile vs desktop handled at the browser engine code level? There are actually surprisingly few differences beyond touch input and screen size handling.