Back

Gosub – An open-source browser engine

404 points1 yeargithub.com

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!

nwah11 year ago

Needs 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.

jaytaph1 year ago

Good 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.

sharktheone1 year ago

We 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

PaulDavisThe1st1 year ago

[flagged]

satvikpendem1 year ago

Well, it is an initialism not an acronym originally.

jfengel1 year ago

As a BASIC programmer from the 1980s, thank you for that heart attack.

moron4hire1 year ago

They say BASIC programmers never die, the just GOSUB and never RETURN.

p0w3n3d1 year ago

I remember my Atari behaving awfully slow (whole atari basic environment, even after the program finished) because I did many GOSUBs without the amount of RETURNs necessary, and didn't understand why because I was only 9yo at that time...

versteegen1 year ago

Trivia: at least in some BASICs (QBasic, QuickBasic, FreeBASIC) it's not necessary for every GOSUB to be matched with a RETURN, since the GOSUB is a single 'call' instruction that pushes onto the stack (and RETURN is a single 'ret' instruction, hence GOSUB-RETURN is highly efficient!) so it gets removed when you exit the function if you didn't RETURN, like alloca(). I actually re-implemented GOSUB this way using macros and inline assembly. I called it GOSUB/RETRACE.

tasty_freeze1 year ago

In Wang BASIC, there was the "RETURN CLEAR" statement which cleared the stack up to and including the most recent GOSUB call frame. This includes any FOR loop frames that were push on the stack in the subroutine before the GOSUB. This was intended to be used for handling error conditions.

https://www.wang2200.org/basic_comparison.html#retclear

Yoric1 year ago

Or we get lost in DATA.

readyplayernull1 year ago

Just PEEK every address.

+1
hallway_monitor1 year ago
arethuza1 year ago

For some reason your comment made me think about computed gosubs - pretty sure I've managed to forget about those for ~40 years!

sharktheone1 year ago

lol GOSUB as a BASIC command, yes I can see the reference. It actually referes to the BASIC command.

mxuribe1 year ago

Thanks for this! I didn't really use BASIC much back in the day, but I am from - ahem - an older time...and the name seemed so familiar, but quite couldn't place my finger on it. so, thanks for clarifying this! :-)

legends2k1 year ago

Logo? Lisp? Punched cards?

IshKebab1 year ago

It's a great name!

dang1 year ago

Related:

I'm fed up with it, so I'm writing a browser - https://news.ycombinator.com/item?id=37608580 - Sept 2023 (477 comments)

p0w3n3d1 year ago

how to introduce progress into civilisation? Just make some devoted engineer angry

lioeters1 year ago

So 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.

opem1 year ago

It'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 :)

dmz731 year ago

Isn't this how generative models are supposed to be used? Instead of generating a sub-par (no pun intended) logo myself, I get a model to build one for me. It is the same as using any computer software to achieve the goal - human is providing the inputs and hardware and software are generating the output.

opem1 year ago

> Isn't this how generative models are supposed to be used?

Might be, or better just use the name as the logo. At this initial stage no one expects to see a good branding I guess.

I've recently seen lots of low effort, sketchy looking projects using "sub-par" quality AI generated assets...and in turn when I see these kinds of images used in some project it really just shows off "put least effort to get things done" mentality...I feel.

ForHackernews1 year ago

"put least effort to get things done"

Some would say that's the mark of a great engineer.

Zardoz841 year ago

Instead of generating a sub-par (no pun intended) logo myself, you should PAY to someone to make a logo, instead of stealing work from other people.

ipaddr1 year ago

Using AI to generate a logo is no more stealing than asking a designer to make a logo. A designer will pull ideas from prior art.

GoblinSlayer1 year ago

That said, can't AI iteratively edit a picture? Then it can accumulate lots of input and one couldn't say input was small.

A4ET8a8uTh01 year ago

I think, at this stage, logo is the least important piece in all this.

+1
opem1 year ago
Arcuru1 year ago

I generally agree with that..for a for profit project.

Gosub, despite have 2.6k Github stars, has a grand total of 0 sponsors. They literally take in no money. This is someone's unpaid side project.

I expect a designer would be welcome to contribute a design, just like coders can contribute code.

GoblinSlayer1 year ago

It's a glossy 3D emblem which aren't drawn today, it's like stealing sand from a desert.

sharktheone1 year ago

No, the website isn't AI generated. There might be some parts of it, though, like general structure of the website and structure of texts.

Yes, the initial logo design was generated by AI, however the current logo was made by a designer from the AI's draft.

I don't know if it is a compliment that my website design skills match the ones of AI or if it is more an insult

IggleSniggle1 year ago

I love the logo and I love the name. Sounds like a polarizing logo; that's a good thing. I remember having similar thoughts to this other person when Google first launched their search engine with their "ugly rainbow" logo. You're good.

opem1 year ago

> I don't know if it is a compliment that my website design skills match the ones of AI or if it is more an insult

Neither, it has nothing to do with design. I just wanted to point out that putting an AI generated logo, and writing vague statements like "optimised search and unlimited browsing" seems unprofessional to me.

sharktheone1 year ago

The "optimised search and unlimited browsing" isn't really a statement, it is the expanded form of the acronym gosub. As I said, I don't really like it, but this is what we have now... :/ But I can definitely see where you are coming from.

+1
vrighter1 year ago
DaSHacka1 year ago

> P.S. the website and the probably AI generated logo is giving a sketchy vibe about the project :)

The first half of this post reeks of GPT-ness as well, that was the first thing I noticed.

serf1 year 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

afavour1 year ago

Just 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.

sharktheone1 year ago

Iirc 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_dean1 year ago

I don't think that's meant to be taken seriously/literally - seems like a tongue-in-cheek acronym for "GOSUB".

opem1 year ago

> certainly some reasoning would be more constructive than a smiley face...

I already gave the reasons there.

> I didn't share the same feeling.

Just a personal opinion.

dullcrisp1 year ago

The viewport is very wide on mobile Safari

mtlynch1 year ago

The 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

HN discussion at the time: https://news.ycombinator.com/item?id=37608580

DoctorOW1 year ago

Why 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.

ipaddr1 year ago

Because Servo is run by others with a different agenda that came from a billion dollar company that gets hundreds of millions from a trillion dollar company and they decided to dropped it. The political effort to get to a place where you can shape the project is a huge mountain to climb and unlikely.

Starting your own project you can set the agenda and pace and truly create your vision.

The people who want to do the first idea are very different from the group that want to do the second.

shiroiushi1 year ago

Why not fork it then? You don't need to be able to set the agenda for a project if you just fork it and rename it: you can now set the agenda for your fork and ignore the other project, while not having to spend time reinventing the wheel.

fkyoureadthedoc1 year ago

As if that wouldn't end up with the same style of "why don't you just" comments?

+1
kentrado1 year ago
exe341 year ago

people 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!

A4ET8a8uTh01 year ago

Agreed. 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.

PaulDavisThe1st1 year ago

Try replacing "should" with "wouldn't it make more of a positive change in the world if" and see how that leaves you feeling.

A4ET8a8uTh01 year ago

The 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.

exe341 year ago

no, 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.

+1
xigoi1 year ago
skyfaller1 year ago

Why Gosub if it isn't written in Go? Should have been called Rustsub ;-)

cyberax1 year ago

Personally, it reminded me of BASIC, not go.

thwg1 year ago

Someone else should write a browser engine called “Godom”. Which honestly would be a great name. A good browser will handle sessions and DOM.

mxuribe1 year ago

Would someone please fix this GODOM browser that keeps crashing... Lol

Ok, I'll see myself out now. ;-)

coolcoder6131 year ago

The 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.

sharktheone1 year ago

Gosub is kind of an acronym. I don't really like it, but yeah Gosub and go would be more similar than to Rust

johnwbyrd1 year ago

Yes, 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_y...

zamadatix1 year ago

Servo and Ladybird are more active than ever, each having fresh funding and ramping up focused development. Flow is a commercial project for embedded media devices (not just available on rpi, it actually came there later) and seems to be doing well? Sciter I don't know one way or the other about, it seems to have a few popular apps using it but I don't know if it died off since then or is just going strong. Netsurf has always been a bit by the wayside but it doesn't seem like founders getting exhausted has much to do with that.

There are plenty of browser engines that have fallen by the wayside, often for reasons unrelated to the founders, but that particular list actually paints a surprising amount of the opposite to me. For once since Chrome came out (it at least introduced v8 even if it started with webkit) I have the feeling there are browsers engines in development that can actually attempt to load the modern web and will actually have products for general use cases (instead of specialized ones) in the coming years.

throwup2381 year ago

I wouldn’t call Sciter a browser engine. The CSS syntax is similar and some properties behave the same, but it doesn’t implement web standards by design.

mjrpes1 year ago

All I have to do is stumble upon a heated 100+ post discussion on the implementation details of an arcane feature of CSS to understand how mammoth an undertaking it must be to develop a fully compatible browser engine.

diggan1 year ago

> develop a fully compatible browser engine

Do we need more "fully compatible" engines? I could imagine there are use cases for browser engines that work with just parts of the specification, particularly the most common ones used in the wild.

pests1 year ago

Just as a data point, the YouTube app on most TVs and devices is a stripped down browser only supporting exactly the HTML/CSS/JS needed to run the big picture client.

By tighter integration with the final product, the browser can provide specialized elements or APIs to simplify the actual application code.

I think it's used a few other places as well.

+1
madeofpalk1 year ago
roywashere1 year ago

Google tried a browser that only supported <div> and limited CSS for embedded purposes and it went nowhere

airstrike1 year ago

That just means that specific subset of features wasn't lucky enough to make it compelling at that particular point in time for the markets it meant to address.

Change any of those variables and you may have a winning proposition.

hypeatei1 year ago

The 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_rider1 year ago

Something 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.

FpUser1 year ago

Because the complexity and functionality of the modern (whatever the fuck this means) browser basically approaches one of the OS with all the consequences.

hypeatei1 year ago

Yeah 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.

josephg1 year ago

Yeah. 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.

+1
FpUser1 year ago
9999000009991 year ago

Honestly, I view projects like this as more of an intellectual curiosity than anything which seeks to become useful .

The Firefox engine is great if you don't want something controlled by Google. And it's going to be much easier to develop plugins or extensions for that versus trying to write your own browser from scratch, which to be honest will probably cost hundreds of millions of dollars. If not more.

I do imagine tools like this being useful for something like web scraping, but it's never going to be an end user product.

codetrotter1 year ago

> more of an intellectual curiosity than anything which seeks to become useful

I am reminded of this:

“I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu) for 386(486) AT clones.”

– Linus Torvalds, announcing the software that became what we now know as Linux

qzw1 year ago

One can only hope we can get a browser the same way we got Linux, but as RMS was fond of pointing out, Linux’s success had a lot to do with the existence of a full suite of GNU software that could run on top of a new kernel. If only we had something like GNU with browser engines, I’d be more optimistic about the chances for success of many new entrants.

kibibu1 year ago

> Linux’s success had a lot to do with the existence of a full suite of GNU software that could run on top of a new kernel

I've heard this a number of times; but circa 1991 I'm not convinced. The critical GNU components to scaffold Linux adoption were:

- GCC + C runtime

- A shell (plus a bunch of small utilities)

You could make a reasonable argument that Linux was and remains a much bigger achievement, namely because GNU has never actually managed to make a usable kernel (Hurd still has no USB support, for example. I don't know if this is for technical or political reasons). On the flip side, there were plenty of compilers and shells kicking around that Linux could have bundled.

RMS makes all sorts of wild claims about how much of a distro is "GNU software" (a criterion that is never clearly defined - is any non-kernel GPL software part of GNU?) by comparing lines of code; but at the time of these claims distros tended to bundle anything and everything that you might possibly want.

Contemporaneously to all this, 386BSD had created a full freely-distributable Unix with no GNU code; and its descendants might have captured the mindshare were it not for an extended copyright battle from AT&T.

Yoric1 year ago

A browser written in HTML on top of a rendering engine?

Mozilla had one a while ago: https://github.com/browserhtml/browserhtml . I'm sure it could be updated.

ZeroGravitas1 year ago

Or khtml which became the basis of WebKit and later Blink.

MYEUHD1 year ago

He ended up only writing the kernel though.

rustdeveloper1 year ago

For web scraping at scale you want to get lost in the crowd. This usually means being (or pretending to be) chromium on windows. Unusual browsers are suspicious, detected or have very distinct fingerprint.

KPGv21 year ago

Indeed. I heard about a browser called Zen a couple weeks ago and installed it. Just took it for a drive yesterday, and by the end of the day, Reddit had blocked me just based on my sporadic, normal use of the site for about two hours here and there while I did other things.

I switched back to Safari and it worked normal immediately.

A4ET8a8uTh01 year ago

I 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/ )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

sharktheone1 year ago

I think I fixed this a while ago, but we didn't update the website deployment

ricardobeat1 year ago

I 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?

nicoburns1 year ago

Yes, we're working on that over at 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.

lenkite1 year ago

Ohhhh...this is so awesome. Fits the most common app usecase for plain HTML+CSS rendering library and not a humongous browser for developing offline apps and its terrific that something like blitz exists.

bobajeff1 year ago

blitz is cool piece of tech but it seems that it needs dioxus framework to do any sort of interactivity which in turn needs to be written in rust. Which is a lot slower than writing a electron app.

sharktheone1 year ago

Well, 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.

retropragma1 year ago

The smallest app built with Tauri is 500 KB.

[1]: https://tauri.app [2]: https://syntax.fm/show/821/is-tauri-the-electron-killer/tran...

jeremyjh1 year ago
flaburgan1 year ago

That's now one of the goal of Servo. Also, did you look at Tauri?

sharktheone1 year ago

Servo 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...

favorited1 year ago

I'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?

vacuity1 year ago

Right? 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.

the__alchemist1 year ago

I suspect people who post these whys haven't actually tried that.

Contributor: Hey, can we add this? Maintainer: No.

thwg1 year ago

Yes I have. But not this.

chasil1 year ago

Would 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

porphyra1 year ago

Sounds 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.

ratmice1 year ago

I would think the MISRA rules against dynamic memory allocation would present serious difficulty if not fundamental incompatibility when trying to implement web standards.

chasil1 year ago

It 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?

cyberax1 year ago

No.

thwg1 year ago

I'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.

thesuperbigfrog1 year ago

"GOSUB" is the syntax used to call subroutines (functions) in BASIC:

http://retro-basic.com/manual/GOSUB.html

thwg1 year ago

Thanks 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?

tadfisher1 year ago

1. 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

Pikamander21 year 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!

Y_Y1 year ago

Oh no! Don't tarnish the rust!

KPGv21 year ago

> obsolete, pre-modern language

but enough about Visual Basic (which still has gosub)

rep_lodsb1 year ago

Then they'd have to use Ruby

keyle1 year ago

There is always room for the go version as GoSub-go /s

cxr1 year 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.

thawab1 year ago

I 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

KPGv21 year ago

> there is a market

OP is not trying to find a market.

dustedcodes1 year ago

Why does it matter if it’s written in Rust?

keyle1 year ago

Rust gives you the performance of C++ if not better sometimes, with code that won't go haywire at the 11th hour. There is value in that, particularly in an application that's sole purpose is to load arbitrary stuff from the internet.

Also if it was written in anything else, it probably wouldn't get the coverage it gets ;)

smt881 year ago

Rust was invented to make it easier to write a secure, performant browser engine

vacuity1 year ago

It'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!)

IshKebab1 year ago

Projects 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".

PaulDavisThe1st1 year ago

There 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.

jancsika1 year ago

> There are long lasting bridges made of stone, concrete and in the right climates, even wood. Not to mention rope when it suits the purpose.

I'd be fine with someone building a new browser out of stone, concrete, wood, or even rope.

Just don't build it out of C/C++ because those languages aren't memory safe.

+1
PaulDavisThe1st1 year ago
IshKebab1 year ago

Nobody is saying that. But to continue your analogy, do you not think that in a world where all the bridges are made of wood it would be notable to say that a new bridge is made of steel?

Of course there are impressive projects made with C. But we generally don't build large bridges out of wood anymore do we.

+1
PaulDavisThe1st1 year ago
vacuity1 year ago

Try your best to ignore the rewrite-it-in-Rust people. They're just plain wrong for that. But yes, for a niche like browser engines, Rust is pretty darn well suited.

pessimizer1 year ago

1) I suspect that it's important for potential contributors to know what language it's written in.

2) It mattered enough for you to complain about it for some reason, so look at that reason, then look at its reflection.

dustedcodes1 year ago

Huh, Complain??

spoiler1 year ago

A 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

goodpoint1 year ago

> having a diverse landscape of engines is the only way to defeat a monoculture

A project like this should be under GPL

bobajeff1 year ago

Since 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.

sharktheone1 year ago

I 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!

jedisct11 year ago

Should have been written in BASIC.

joshmarinacci1 year ago

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

sharktheone1 year ago

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.

joshmarinacci1 year ago

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.

sharktheone1 year ago

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.

+1
rixed1 year ago
diggan1 year 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.

joshmarinacci1 year ago

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.

levkk1 year ago

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...

jaytaph1 year ago

For those wondering which blogpost i referred to: https://news.ycombinator.com/item?id=41835040

sharktheone1 year ago

It looks like, this is the wrong link. I think you meant https://news.ycombinator.com/item?id=37608580

alexkbog1 year ago

[dead]

terminalbraid1 year ago

[dead]

sandGorgon1 year ago

[flagged]

FleetAdmiralJa1 year ago

0 days since the last browser engine