←back to thread

233 points monax | 1 comments | | HN request time: 0s | source

We’ve been working on Vaev, a minimal web browser engine built from scratch. It supports HTML/XHTML, the CSS cascade, @page rules for pagination, and print-to-PDF rendering. It even handles calc(), var(), and percentage units—and yes, it renders Google.com (mostly).

This is an experimental project focused on learning and exploration. Networking is basic (http:// and file:// only), and grid layouts aren’t supported yet, but we’re making progress fast.

We’d love your thoughts and feedback.

Show context
mdaniel[dead post] ◴[] No.44023892[source]
[flagged]
n2d4 ◴[] No.44024147[source]
The fact that other browsers are huge engineering efforts only makes it more interesting to many. It's arguably one of the hardest things a programmer could build, how could you not wanna build one!
replies(1): >>44024248 #
hawk_ ◴[] No.44024248[source]
Yes but why do it in C++? There is no compiler enforced safe mode and you're by definition implementing an engine to run hostile code in it.
replies(3): >>44024324 #>>44024465 #>>44024599 #
1. monax ◴[] No.44024324[source]
> There is no compiler enforced safe mode

It's still early days, but Clang can check some lifetimes, using the [[clang::lifetimebound]] attribute [1]. You can also restrict unsafe pointer usage [2] outside designated blocks of code—somewhat like Rust’s unsafe keyword.

[1] https://clang.llvm.org/docs/AttributeReference.html#id8 [2] https://clang.llvm.org/docs/SafeBuffers.html#buffer-operatio...