←back to thread

403 points jaytaph | 9 comments | | HN request time: 0.212s | source | bottom

Last year I wrote a post about trying to make a change in the world by writing a browser.

Today, we're excited to introduce Gosub, a new open-source browser engine that we are building from the ground up in Rust!

Gosub aims to be a modern, modular, and highly flexible browser engine. While still in the early development and experimentation phase, Gosub is shaping up nicely, and we’re looking to onboard more contributors to help us bring this project to life.

Some of the key highlights:

  * Written in Rust: We're leveraging Rust's safety and performance features to create a robust and efficient engine.
  * Modular Design: The project is organized around modules, allowing for clean separation of concerns and easier collaboration. It also allows us to easily swap components based on needs and allows more freedom for engine implementers in the future.
  * Collaborative and open source: We’re building Gosub with the intention of making it approachable and open to contributions, aiming to create a project that's easier to understand and collaborate on compared to existing browsers.
Instead of writing another shell around Chromium or WebKit, we decided to write a browser engine from scratch. We believe that having a diverse landscape of engines is the only way to defeat a monoculture that is currently threatening current browsers and by extension the internet itself. We cannot and should not let a very small number of large companies dictate the future of the web and its usage.

With Gosub, we're aiming to build something more approachable that can evolve with the latest web technologies, all while being open to contributors from day one.

We’re looking for developers with or without experience in Rust. You just need to be interested in browser technologies. There are plenty of opportunities to work on core modules, document our progress, and help shape the project's direction.

We can already render simple pages, including the hackernews front page. However, to render most sites correctly, it is still a long journey, so come and join us!

1. joshmarinacci ◴[] No.41841231[source]
Former Mozilla employee here.

The fact that they are writing their own bytestream abstraction does not bode well.

That said, I hope they succeed at shipping something, even if it’s not competitive with Chrome.

My previous thoughts on the topic: Why you can’t build a web browser and why you should anyway.

https://joshondesign.com/2022/12/14/browser_1000_loc

replies(3): >>41841266 #>>41841318 #>>41842776 #
2. diggan ◴[] No.41841266[source]
> The fact that they are writing their own bytestream abstraction does not bode well.

You want to elaborate on why exactly? Seems like a kind of shallow dismissal, but then I'm no browser engine developer exactly, maybe it's obvious.

replies(1): >>41841321 #
3. sharktheone ◴[] No.41841318[source]
The byte stream is one of the first components that was written. Probably It wouldn't be written nowadays. The browser is quite modular, so in the end you can completely out out of that system.
replies(1): >>41841879 #
4. joshmarinacci ◴[] No.41841321[source]
You can only do so much, so success depends on which components you decide to reuse. I wouldn’t build a new database or filesystem abstraction from scratch, for example.

Rust has lots of bytestream abstractions already with a ton of work put into them. Maybe they have a valid reason for going their own way. I’d like to know.

5. joshmarinacci ◴[] No.41841879[source]
That’s good to hear. I’m excited to see you’ve got a good html parser. That’s worth a lot just by itself.
replies(1): >>41842517 #
6. sharktheone ◴[] No.41842517{3}[source]
Yes, the HTML parser, probably the component that is the most spec compliant. I think the CSS parser also is. For the initial phase, I think it is more important to get something working. For a later implementation, the spec should dictate what we do and what not. But with a small team, it is just not feasible.
replies(1): >>41845418 #
7. levkk ◴[] No.41842776[source]
There are people who write their own hash tables, and there are those who just use a library. What may seem like a bad idea to some is trivial to others. Hacker culture is way more fun when you are allowed to use recursion [1].

[1] https://www.reddit.com/r/cscareerquestions/comments/ntvtzq/c...

8. rixed ◴[] No.41845418{4}[source]
Isn't one of the difficultlies of writing a browser that your parser must accept lots of invalid inputs and render it like other browsers would?
replies(1): >>41850537 #
9. shiomiru ◴[] No.41850537{5}[source]
HTML5 parsing is relatively easy, because behavior for tag soup is 100% specified. That is, in theory, all conformant HTML5 parsers should output the same DOM for any arbitrary byte sequence.

Layout is much harder because the CSS spec is full of UB, so you will have to do some reverse engineering there.