{"by":"crediblejhj","descendants":45,"id":46795540,"kids":[46800225,46801101,46800278,46799856,46808706,46798885,46802266,46800389,46799974,46799087,46804769,46800951,46800535,46798952,46800224,46800229,46798898,46798953,46799182],"score":146,"text":"Hi HN! Korean high school senior here, about to start CS in college.<p>I built a browser engine from scratch in C++ to understand how browsers work. First time using C++, 8 weeks of development, lots of debugging—but it works!<p>Features:<p>- HTML parsing with error correction<p>- CSS cascade and inheritance<p>- Block&#x2F;inline layout engine<p>- Async image loading + caching<p>- Link navigation + history<p>Hardest parts:<p>- String parsing(html, css)<p>- Rendering<p>- Image Caching &amp; Layout Reflowing<p>What I learned (beyond code):<p>- Systematic debugging is crucial<p>- Ship with known bugs rather than chase perfection<p>- The Power of &quot;Why?&quot;<p>~3,000 lines of C++17&#x2F;Qt6. Would love feedback on code architecture and C++ best practices!<p>GitHub: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;beginner-jhj&#x2F;mini_browser\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;beginner-jhj&#x2F;mini_browser</a>","time":1769609008,"title":"Show HN: I built a small browser engine from scratch in C++","type":"story","url":"https://github.com/beginner-jhj/mini_browser"}