6 ms·
What we all REALLY care about: they went with C++ and Qt https://github.com/SerenityOS/serenity/tree/master/Ladybird https://github.com/SerenityOS/serenity/tre
by ryanjshaw 4y ago
What we all REALLY care about: they went with C++ and Qt
https://github.com/SerenityOS/serenity/tree/master/Ladybird https://github.com/SerenityOS/serenity/tree/master/Ladybird
- codetrotter 4y agoThe cross-platform version of the browser uses Qt The version of the browser native to SerenityOS hopefully still uses the SerenityOS GUI libraries
- throwaway2037 4y agoIt looks like they ported Qt to SerenityOS. I saw a package called "qt6-serenity". Perhaps they use the SerenityOS GUI libraries underneath. Does anyone know?
- tristan957 4y agoLadybird is a browser based on SerenityOS technologies that uses Qt as the GUI framework. In SerenityOS, they have their own browser using the same underlying technologies, but a different in-house GUI framework. WebKit and Blink are similar in how they have their different counterparts like QtWebEngine or WebKitGTK. The equivalent to WebKit and Blink in SerenityOS is called LibWeb.
- throwaway2037 4y agoHmm, I was actually asking if SerenityOS released a "fork" of Qt that re-implements class QPaint to use their native GUI API. I assume yes. QPaint is turtles all the way down to paint pixels on any platform -- MacOS, Win32, X Windows, Wayland, Android, iOS, embedded (auto), etc.
- krzyk 4y agoExactly, adding to that: they are NOT repackaging/rebranding chrome/chromium, they are actually building a browser.
- capableweb 4y agoThe "modern" distinction would be they are building a browser + browser engine, while most fancy new browsers tend to just reuse existing engines, like Edge did with Blink.
- eastbound 4y agoI thought unsafe language were a no-go in the context of extremely vulnerable pieces of software like the web?
- TedDoesntTalk 4y agoFirefox has tons and tons of C++ to this day.
- monooso 4y agoBut would they choose C++ if they were _starting_ today?
- tzekid 4y agoI do mostly Python on my dayjob, but for low-level side-projects I've gotta say C++ with the C++17 or C++20 standard it's way faster to iterate with than say Rust or even something like Zig. For me iteration speed's a big selling point that (plus the fact that's easier to find contributors) might also be important for projects like these.
- chrismorgan 4y agoI’m puzzled by your comment. I am expert in Rust for almost a decade, but only mildly conversant in C++, and have no interest in actively learning more C++. Rust seems to me far easier to learn and get going in due in major part to its incontrovertibly superior standard tooling. I can’t see any place for any meaningful difference in iteration speed between the two, save that you may well have to iterate more in C++ due to memory safety bugs the compiler doesn’t catch. As for finding contributors, I get the impression that Rust is considerably more accessible, and thus will increasingly find contributors more easily, as people that just love programming will actively choose to learn Rust far more often than C++. (For the current state of affairs, I think it’ll depend on what sort of contributor you’re looking for, in skill, industry, paidness, &c. Some segments will certainly go one way, and others certainly the other.)
- ChickeNES 4y agoI would really like to see a version with a C API capable of being embedded, there's a lot of places where a lightweight HTML renderer would be useful, plus it would make it easier to port to other hobby kernels.
- vbitz 4y agoI experimented with this a while ago but didn’t get very far. The rendering was done into a pixel buffer with inputs being passed though a few relatively simple C++ classes. I think that a small embedded version would make for a great UI framework with minimal dependencies.
- kitsunesoba 4y agoAgree. This market is currently cornered by WebKit, which is easily the most language and UI framework agnostic engine there is. Blink might be similarly easy to embed but I’ve not seen it used that way — Blink embedding tends to be via Electron, CEF, or Qt, whereas you might run into WebKit in some random program written with any number of UI frameworks. There used to be Gecko as an option here too, but Mozilla decided that it shouldn’t be usable outside of XULRunner and made it effectively unembeddable unless you’re willing to commit to XUL.
- nashashmi 4y agoThis was a missed opportunity to build in rust. Servo was the previous engine that got abandoned midway. They should have continued that.
- F3nd0 4y agoI care more about the choice of licence… and sadly enough, they went with a pushover/permissive one. This seems like the kind of project where copyleft is by far the better choice.