8 ms·
Gosub – An open-source browser engine
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!
- deleted 2y ago[deleted]
- jaytaph 2y agoFor those wondering which blogpost i referred to: https://news.ycombinator.com/item?id=41835040 https://news.ycombinator.com/item?id=41835040
- sharktheone 2y agoIt looks like, this is the wrong link. I think you meant https://news.ycombinator.com/item?id=37608580 https://news.ycombinator.com/item?id=37608580
- A4ET8a8uTh0 2y agoI applaud the project espoused spirit, because, similarly to the author(s)' webpage, i don't think we should have a monopoly in this space ( especially given recent moves by Google ). Small things to be noted ( in the small, but noticeable category): - repeated paragraph ( https://gosub.io/learn-more/ https://gosub.io/learn-more/ )from 'Gosub started' to 'open and free' - that is it for now:D.. I will be personally watching it with some interest edit: some grammar
- sharktheone 2y agoI think I fixed this a while ago, but we didn't update the website deployment
- nwah1 2y agoNeeds an FAQ Why isn't contributing to existing projects like Servo feasible? Do they reject the benefits of modularity? What existing code is being leveraged, or is this entirely from scratch? Why was lifting code from Servo or elsewhere not sufficient? Is this project intending to remain fully non-profit or is there some kind of vision for monetization to support the gargantuan amount of effort it would take? It says writing a javascript engine is out of scope, but it still isn't clear definitively what is in-scope or out of scope.
- jaytaph 2y agoGood points.. we will definitely set up a FAQ with these kind of questions. But to be honest, we might not have an answer for all of them. Why not use Servo's CSS system and create our own, but using v8 javascript engine is mostly a question answered by: "don't know".. Obviously we cannot write everything by scratch, but we don't know yet where we draw the line.. We like to keep things modular as possible so we can easily swap out the systems we use in favor of better ones in the future.
- sharktheone 2y agoWe actually kind of have a javascript engine. It is a more personal project of mine, but it is also intended to be used and intigrated into gosub. In case someone is interested, here is the repo: https://github.com/Sharktheone/yavashark https://github.com/Sharktheone/yavashark
- PaulDavisThe1st 2y ago[flagged]
- satvikpendem 2y agoWell, it is an initialism not an acronym originally.
- johnwbyrd 2y agoYes, but I'm concerned about the number of existing browser engines that have fallen by the wayside, as the project founders have become exhausted. The scope of such a project is incredibly easy to underestimate, and it has only ever gotten larger. Some examples: https://www.reddit.com/r/browsers/comments/124kphe/what_do_you_think_about_alternative_browser/ https://www.reddit.com/r/browsers/comments/124kphe/what_do_y...
- hypeatei 2y agoThe various web specifications are insanely complex (e.g. navigables) so I can see how people burn out from it. To add onto that, a browser operates in an extremely hostile space security wise; to be a serious competitor, you'll need to be on top of your game in that regard which maybe Rust will help with.
- bee_rider 2y agoSomething very silly has happened, where the thing that most non-technical people have which is most exposed to hackers is also incredibly complex and requires high performance for some reason.
- hypeatei 2y agoYeah it's a real shame. The complex (and ever expanding) nature of the web is the real thing entrenching incumbents like Google. They have the existing codebase and resources to handle the complexity.
- josephg 2y agoYeah. I still hope at some stage we build something much simpler that maintains the same security boundary. Like an application platform (forget documents) built entirely on wasm, and with capability based security. That would let you launch apps made within the platform just as easily as you currently open a website. The platform would need some primitives for rendering, UI, accessibility and input handling. But hopefully a lot of those APIs could be much lower level than the web provides today. Move all the high level abstractions into library code that developers link into their wasm bundles. (For example, I’m thinking about most of what css does today.) That would allow much faster innovation in layout engines and other things the web does today, and a smaller api surface area should lead to better security. It’s quite possible to build something like this today. It’s just a lot of work. Maybe when chatgpt is a bit smarter, it might be able to do the lion’s share of the work to make this happen.
- chasil 2y agoWould a fork of Chromium that was restricted to MISRA-C/C++ offer any real security advantages? Would parts of Chromium be fundamentally incompatible with these standards? https://en.wikipedia.org/wiki/MISRA_C https://en.wikipedia.org/wiki/MISRA_C
- cyberax 2y agoNo.
- ratmice 2y agoI would think the MISRA rules against dynamic memory allocation would present serious difficulty if not fundamental incompatibility when trying to implement web standards.
- chasil 2y agoIt is against the rules to call malloc, yes. However, it is not against the rules to launch another process with a static amount of declared memory, then access it over shmat(). This is cheating, but could it be safer?
- porphyra 2y agoSounds very hard. For example, Rule 21.3 in MISRA C 2012 basically prohibits dynamic memory allocation (e.g. malloc, calloc, realloc, free). Implementing a browser with such restrictions would be quite misrable.
- alexkbog 2y ago[dead]
- DoctorOW 2y agoWhy not spend this effort contributing to Servo, which is also written in Rust? It seems the two projects share similar goals but Servo has a massive headstart.
- exe34 2y agopeople really need to take a democratic vote on what they do in their free time, it's getting ridiculous, some of them are even having fun now!
- A4ET8a8uTh0 2y agoAgreed. Honestly, wasn't the whole purpose of open source to be kinda free for all ( the followers, the inventors, the grinders... you name it ). Why does everything I read lately start with a 'should'. I am making a mental note to self.
- PaulDavisThe1st 2y agoTry replacing "should" with "wouldn't it make more of a positive change in the world if" and see how that leaves you feeling.
- A4ET8a8uTh0 2y agoThe problem is that we all vastly differ on what constitutes a positive change. I can practically guarantee you that you are somewhat unlikely to see changes I would suggest as 'positive'. On the other hand, it is not unlikely I would see yours as positive either. That is why, for all its flaws ( and current set of issues ), current attempt at self-organization is simply better in the long run even if it is a little messy.
- exe34 2y agono, it probably wouldn't. if people are doing it for fun, they don't want to sit in meetings with strong personalities telling them how to do it. they enjoy coding, they enjoy thinking through interesting things, they don't enjoy taking orders and doing things a certain unfulfilling way just because somebody else prefers it that way. usually you have to pay them for putting up with that kind of thing.
- skyfaller 2y agoWhy Gosub if it isn't written in Go? Should have been called Rustsub ;-)
- coolcoder613 2y agoThe name gosub reminds me of the BASIC command, and at first I was expecting it to be written in FreeBASIC or some other BASIC dialect.
- sharktheone 2y agoGosub is kind of an acronym. I don't really like it, but yeah Gosub and go would be more similar than to Rust
- cyberax 2y agoPersonally, it reminded me of BASIC, not go.
- thwg 2y agoSomeone else should write a browser engine called “Godom”. Which honestly would be a great name. A good browser will handle sessions and DOM.
- mxuribe 2y agoWould someone please fix this GODOM browser that keeps crashing... Lol Ok, I'll see myself out now. ;-)
- dustedcodes 2y agoWhy does it matter if it’s written in Rust?
- smt88 2y agoRust was invented to make it easier to write a secure, performant browser engine
- vacuity 2y agoIt's funny; I wish Rust was better suited for bare metal than it is now. But no matter how much people perceive Rust as a bare metal language like C, it was quite literally made for a level or two above that, in browser engines. (Here's to hoping Rust for Linux continues to drive progress for bare metal Rust!)
- spoiler 2y agoA few thing from the top of my head: - Might be interesting to integretors (FFI, dylib, Rust projects) - Signals some characters: that it's probably safer than alternatives written in non memory safe languages in same class, has good performance - Might attract contributors (ie I'm sure there's an intersection of people passionate abou the web and Rust) - This is hacker news, so it might earn a few extra +1s :P Edit: formatting
- IshKebab 2y agoProjects written in Rust tend to be very fast - as fast as C++ or C code - but without the endless security issues. You may as well ask "why does it matter if this bridge is made of iron".
- PaulDavisThe1st 2y agoThere are long lasting bridges made of stone, concrete and in the right climates, even wood. Not to mention rope when it suits the purpose. Each material has its own qualities, which means its own pros and cons in a given context. This naive belief that there will be one language to rule them all (and is name is <fill-in-the-blank> ignores history and the world outside of programming in a rather silly way.
- favorited 2y agoI'm always disappointed when conversations here are full of "why don't you just contribute to <other project> instead?" Have you never simply desired to do something yourself?
- thwg 2y agoYes I have. But not this.
- the__alchemist 2y agoI suspect people who post these whys haven't actually tried that. Contributor: Hey, can we add this? Maintainer: No.
- vacuity 2y agoRight? I don't think HN needs more obligatory "this is a big undertaking and likely to fail" comments. We can take those as implied. We should 1) engage more meaningfully with the project and 2) keep in mind that negativity hurts a lot more than positivity helps. If you're not up to the task, fine, and maybe they aren't either, but don't drag them down before they've tried.
- joshmarinacci 2y agoFormer 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 https://joshondesign.com/2022/12/14/browser_1000_loc
- diggan 2y ago> 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.
- joshmarinacci 2y agoYou 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.
- sharktheone 2y agoThe 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.
- joshmarinacci 2y agoThat’s good to hear. I’m excited to see you’ve got a good html parser. That’s worth a lot just by itself.
- sharktheone 2y agoYes, 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.
- jfengel 2y agoAs a BASIC programmer from the 1980s, thank you for that heart attack.
- sharktheone 2y agolol GOSUB as a BASIC command, yes I can see the reference. It actually referes to the BASIC command.
- IshKebab 2y agoIt's a great name!
- moron4hire 2y agoThey say BASIC programmers never die, the just GOSUB and never RETURN.
- Yoric 2y agoOr we get lost in DATA.
- readyplayernull 2y agoJust PEEK every address.
- 2y ago
- deleted 2y ago[deleted]
- thwg 2y agoI'm confused. Why do you name it “go”-something when it is not implemented in Go... I have a more catchy name for you, Rub, which stands for route to unlimited browsing.
- thesuperbigfrog 2y ago"GOSUB" is the syntax used to call subroutines (functions) in BASIC: http://retro-basic.com/manual/GOSUB.html http://retro-basic.com/manual/GOSUB.html
- thwg 2y agoThanks for the pointer. And it makes it doubly confusing. Doesn't a reference to an obsolete, pre-modern language tarnish the reputation of Rust? Doesn't the creator of this project fear lawsuits from the legal team at The Basic Foundation?
- tadfisher 2y ago1. No, unless you actively disable your brain's pleasure center 2. No, because GOSUB (the Basic keyword) is not a trademarked term owned by The Basic Foundation
- Pikamander2 2y ago> unless you actively disable your brain's pleasure center Wait, you can toggle that thing on and off? I knew I've been doing something wrong!
- KPGv2 2y ago> obsolete, pre-modern language but enough about Visual Basic (which still has gosub)
- Y_Y 2y agoOh no! Don't tarnish the rust!
- 2y ago
- terminalbraid 2y ago[dead]
- thawab 2y agoI would recommend to focus on a niche like browser automation/QA with puppeter specially after they released the webdriver bidi[0]. There is a market for this kind of product if it's lighter/faster than chrome. [0] https://developer.chrome.com/blog/webdriver-bidi https://developer.chrome.com/blog/webdriver-bidi
- KPGv2 2y ago> there is a market OP is not trying to find a market.
- dang 2y agoRelated: I'm fed up with it, so I'm writing a browser - https://news.ycombinator.com/item?id=37608580 https://news.ycombinator.com/item?id=37608580 - Sept 2023 (477 comments)
- p0w3n3d 2y agohow to introduce progress into civilisation? Just make some devoted engineer angry
- lioeters 2y agoSo true. It's how we got rms and the GNU project. > In 1980, Stallman and some other hackers at the AI Lab were refused access to the source code for the software of a newly installed laser printer, the Xerox 9700. ..This experience convinced Stallman of people's need to be able to freely modify the software they use. And Linux. > Frustrated by the licensing of Minix, which at the time limited it to educational use only, he began to work on his operating system kernel, which eventually became the Linux kernel.
- opem 2y agoIt's true that the complexity of these kinda projects are enormous, but considering chrome/webkit's monopoly in the browser space, I feel we should always welcome and appreciate alternative efforts...regardless of the project's outcome. P.S. the website and the probably AI generated logo is giving a sketchy vibe about the project :)
- serf 2y ago>P.S. the website and the probably AI generated logo is giving a sketchy vibe about the project :) certainly some reasoning would be more constructive than a smiley face, because I looked at the website, I looked at the logo[0] - I didn't share the same feeling. Certainly it could be AI generated, but why 'sketchy'? Is it something to do with your own personal feelings on AI use, or just the aesthetic in general? I genuinely don't understand -- this isn't a criticism or witty comment lest it be taken that way. [0]: https://gosub.io/gosub-logo.svg https://gosub.io/gosub-logo.svg
- afavour 2y agoJust a personal perspective… no problem with the logo but the headline “The Gateway to Optimized Search and Unlimited Browsing” Doesn’t really mean anything to me and does sound vaguely scammy. Anyone promising me the gateway to unlimited anything gets a raised eyebrow, two if it’s something I already have unlimited access to.
- sharktheone 2y agoIirc that thing was also AI generated. I don't like it, but here we are and have this sentence. Imo ChatGPT is for name generation not the... best
- mega_dean 2y agoI don't think that's meant to be taken seriously/literally - seems like a tongue-in-cheek acronym for "GOSUB".
- opem 2y ago
- mtlynch 2y agoThe blog post that prompted the author to start this project: I'm fed up with it, so I'm writing a browser (September 2023): https://adayinthelifeof.nl/2023/09/22/browsers.html https://adayinthelifeof.nl/2023/09/22/browsers.html HN discussion at the time: https://news.ycombinator.com/item?id=37608580 https://news.ycombinator.com/item?id=37608580
- ricardobeat 2y agoI was hoping for a small embeddable engine to finally replace Electron. The build on Windows ends up being 55MB, not too bad but still too large for simple apps. Is anyone working on something like that?
- flaburgan 2y agoThat's now one of the goal of Servo. Also, did you look at Tauri?
- sharktheone 2y agoServo and Tauri still let the Application use JavaScript, which is just very wasteful. I was thinking about making it possible to write dynamic websites completely without JavaScript, by building up WASM support and making that even faster. But that's a not the goal for now. Indeed, we don't even have a JS API for websites yet...
- sharktheone 2y agoWell, the application is basically unoptimized. However, we also don't have many components yet that can eat up your memory. But we try to keep the memory usage as low as possible. We also thought about integrating it into something like Electron, and for something like that it is important to have a low memory usage. Lateron, we might have some compile time flags to reduce memory usage in cost of a bit of speed. Most Electron apps don't require that big oomf performance on the startup, since everything is locally and can be cached in a better way.
- nicoburns 2y agoYes, we're working on that over at https://github.com/DioxusLabs/blitz https://github.com/DioxusLabs/blitz (alpha release imminent). Our TodoMVC example is current ~20mb with a standard release builds, but comes down to 7.2mb with some compiler flags like -Oz and LTO enabled (these numbers of from macOS). And we plan to allow fine grained configuration of the feature set, so if you don't need certain image formats or layout algorithms or networking support, then you can disable them and save on binary size.
- FleetAdmiralJa 2y ago0 days since the last browser engine
- bobajeff 2y agoSince this compiles to web assembly and is modular I wonder if this will use the wasm component model in the future. It would be interesting to be able to use pieces of this from other languages.
- sharktheone 2y agoI highly doubt that. At least not in a native way. However, you could make an adapter from the native interface to wasm components. Would be interesting to look into!
- goodpoint 2y ago> having a diverse landscape of engines is the only way to defeat a monoculture A project like this should be under GPL
- sandGorgon 2y ago[flagged]
- jedisct1 2y agoShould have been written in BASIC.
- cxr 2y ago> We’re looking for developers with or without experience in Rust. You just need to be interested in browser technologies. Well, both that and the ability to work on a project that requires you to run a toolchain whose minimum barrier to entry wrt resource use and developer experience makes the C++ ecosystem that preceded it seem lean and inclusive.