Readit News logoReadit News
infogulch · 7 months ago
I'm convinced that using an embedded browser engine to render app UI is the future. Browser rendering engines are so powerful and versatile and universal I don't see how they can lose.

"But Electron!" Yes, Electron hasn't taken the world by storm because it has two huge deficiencies: 1. It takes an enormous amount of resources including ram and disk. 2. It has no native DOM API bindings so it takes even more ram and cpu to compile and run JS quickly.

I'm excited for the new crop of browser engines because they could fix those deficiencies, opening up browser tech to app developers without hugely compromising the experience.

lukan · 7 months ago
I am not excited, because HTML is not a great UI framework at all.

It just happens to be the most widespread by accident, because hyperlinked documents - HTML - became huge and then more and more UI elements were bolted on top of it. And suddenly it became the goto, because the plattform run everywhere.

But it is still a ugly mess underneath and you might be right, that it is the future, but it is not a great one. I hope a great one will surface one day and then we can start new with something sane.

"I'm excited for the new crop of browser engines because they could fix those deficiencies"

And I cannot see what fixing those deficiencies could mean other, than throwing most of the standard away. It doesn't mean all of it needs to be thrown away. WebAudio API, WebGPU, etc. all became great standards. But simple UI elements, like a slider or color picker are still just ugly and impossible to make beautiful and behave sane, besides making a new one by hand, or using a libary from someone who did that. But - with WebGPU especially - I am excited for the possibility to build a sane framework on top of some subsets of the browsers capabilities.

codingbot3000 · 7 months ago
That's really a good point. If you're building a native app or similar, why constrain yourself to HTML?
AnonC · 7 months ago
> But Electron!" Yes, Electron hasn't taken the world by storm because it has two huge deficiencies: 1. It takes an enormous amount of resources including ram and disk. 2. It has no native DOM API bindings so it takes even more ram and cpu to compile and run JS quickly.

In my observation, Electron's deficiencies go beyond these two. One glaring issue is the UX not conforming to the native OS guidelines/conventions, including things like keyboard based navigation and OS feature integration.

Give me a native app and an Electron (or similar app, including the abominations that are Catalyst apps on macOS), and I'll choose native apps every time.

diath · 7 months ago
Numerous video games have been doing precisely that for the past decade using CEF: https://en.wikipedia.org/wiki/Chromium_Embedded_Framework
petabyt · 7 months ago
BeamNG does it, and their UI responsiveness is the worst I've ever seen. It runs at most 20fps and using it is straight up painful.
ChocolateGod · 7 months ago
FiveM uses CEF and let's you replace much of the built in GTA V scaleform with it.

It's incredible what can be done but can be far less responsive than the scaleform it replaces, but this may partially be due to it being a third party mod to the game.

promiseofbeans · 7 months ago
Minecraft Bedrock uses React + a "web-like platform" (I assume this means they've just implemented the bits they needed) for their UI: https://github.com/Mojang/ore-ui
ZeWaka · 7 months ago
s/o to CefGlue, the C# bindings: https://github.com/space-wizards/cefglue
zeroq · 7 months ago
and before that Scaleform!
apaprocki · 7 months ago
The Bloomberg Terminal is rendered using Chromium and has been for many years. You don’t need to wait for new browser engines to use the existing ones, but you do need resources to contribute, maintain, bugfix, etc. because there is no such thing as a free lunch.
cjpearson · 7 months ago
Props to Bloomberg for contributing too. I've noticed that they have sponsored the development of CSS Grid and other features in Chromium.
petabyt · 7 months ago
> I'm convinced that using an embedded browser engine to render app UI is the future.

I think Facebook had the same thoughts at some point and they invested heavily in web tech. Later when that backfired (because of performance issues) they started the React Native project.

kylecazar · 7 months ago
Yes, they prioritized just straight up mobile web for a while, citing things like HTML5 as the future of apps.

I think that an embedded web rendering strategy for UI within the context of a framework that provides other native interfaces may indeed become a bigger thing

whywhywhywhy · 7 months ago
Apple purposefully limits what web tech can achieve on their platform so web vs native discussion needs to be heavily caveated on iOS what should be possible just isn’t.

We also know it’s not a case of just Apples native tech being better because MacOS has truly lost to webtech, hard to even name an app built in the last 5-10 years by a 3rd party in Apples own tech. Everything is just Electron or cross frameworks.

Personally I love truly native Mac apps but it’s certainly clear no one else cares and electron is enough.

weinzierl · 7 months ago
"It has no native DOM API bindings"

I wish we'd get direct DOM access from WASM anytime but I have little hope.

infogulch · 7 months ago
Actually, building WASM direct DOM api first, then building the native DOM api as an extension of that sounds like a great idea.
yencabulator · 7 months ago
My understanding is that "the DOM API" is specced very much in terms of Javascript, so WASM component stuff might see a "DOM2 API" that's similar but not really the same API. Lots of work in speccing that out, I bet. But yes, please!
tcfhgj · 7 months ago
why? it doesn't matter in any non-trivial app
cakealert · 7 months ago
Unfortunately, the best GUI in existence atm is a proprietary middleware and the language for it is XAML.

NoesisGUI: https://www.noesisengine.com/xamltoy/0e2a866b60bc2b9a724b4c6...

And it even has a studio for paying clients which makes designing a GUI trivial. https://www.noesisengine.com/studio/

The studio is made using their own GUI library and its sleek af. Not even QT holds a candle to it. Would have been nice to have such a project in the open source world.

pjmlp · 7 months ago
Qt certainly holds several candles, what happens is that people always complain about having to pay for tools, while expecting to be payed themselves.

https://www.qt.io/product/ui-design-tools

mcintyre1994 · 7 months ago
Is that desktop only, or does their demo just not work on mobile but other stuff can? I don’t get a keyboard when I focus their password input on iOS Safari.
lofaszvanitt · 7 months ago
we need something like this but with a css-html-js output
taurknaut · 7 months ago
> Browser rendering engines are so powerful and versatile and universal I don't see how they can lose.

Well browsers are pretty damn heavy for an app that won't use 99% of its functionality. Maybe some of this can be amortized with clever distro work so apps don't have to ship the whole runtime but that hasn't happened yet.

(In fact, it's a little odd to me electron is based on chrome rather than the WebKit that actually ships with macos.... you should be able to ship that sort of app with a few megabytes)

I'd also rather eat glass than be stuck with javascript, easily the most frustrating ecosystem I've ever worked with by a very wide margin. Just the language is ok, but the build pipelines/bundling/transpilation/polyfillls is absolutely miserable to work with and lack of a decent standard library really hurts. It's crazy how we've basically lifted up the concepts of compilation and linking c objects to the world of javascript, just to ship code in a language the browser already fully supports.

Maybe WASM will help but my understanding its use of the DOM is quite awkward and still requires javascript usage.

jampekka · 7 months ago
How does WASM help with the concepts of compilation and linking c objects?
horsawlarway · 7 months ago
I mean... Just to be clear, Electron has pretty much taken the world by storm.

Huge number of Enterprise/productivity apps are shipped on Electron.

It's hard to beat the value proposition on the business side if you need a website for the product.

infogulch · 7 months ago
True but anyone that cares about battery life or runs more than one of these apps hates it. So I guess my threshold for "taken by storm" is both "very common" and "users don't hate it".
pjmlp · 7 months ago
If you need a Website, use a browser.
akritrime · 7 months ago
Yeah I was going to comment the same thing. A very big reason why we are even having this conversation about a browser engine powering native apps is because electron exists. Yes it's sub-optimal but that hasn't impeded its conquest in the slightest.
cyberax · 7 months ago
> I'm convinced that using an embedded browser engine to render app UI is the future.

Sciter exists: https://sciter.com/

And it indeed is great for UI.

philsnow · 7 months ago
> In almost 10 years, Sciter UI engine has become the secret weapon of success

oh neat, I like learning about “secret weapons” like lisp/erlang

> for some of the most prominent antivirus products on the market: Norton Antivirus and Internet Security, Comodo Internet Security, ESET Antivirus, BitDefender Antivirus, and others.

I saw that sentence ending differently in my head...

It just doesn’t seem like a very strong claim, that all these products which don’t really hinge on having great (or even good) UIs consider Sciter to be their secret weapon.

FreezerburnV · 7 months ago
Has it ever been made easy to use on mobile? That’s the big thing that’s always given me pause on investing heavily in using it. Especially since it uses weird syntax in places and isn’t “just a browser”.
mathverse · 7 months ago
Sciter is great but is also just a minefield of bugs and quirks. And its main developer Andrew is too stubborn to realize why it's not popular because he refuses to hire an evangelist that would take care of its missing ecosystem.
KronisLV · 7 months ago
I mean, most OSes already ship with a WebView component that you can use instead of shipping an entire browser runtime.

Wails does that: https://wails.io/

Tauri also does that: https://tauri.app/

That does help with the app sizes quite a bit: https://github.com/Elanis/web-to-desktop-framework-compariso...

Sadly it doesn’t change the memory usage much so the technology is still inherently wasteful, but on a certain level it feels like a lost battle - because web technologies often feel like the choice of least resistance when you want GUI software that will run on a bunch of platforms while not being annoying to develop (from the perspective of your run of the mill dev).

icedrift · 7 months ago
Correct me if I'm wrong, but isn't the problem with tauri and wails that they are still dependent on the client's native OS webview? I know Tauri uses WRY which essentially takes in your request, finds the webview present in the client and calls a corresponding function. The differences between these webviews are vast and you end up with different UIs or cobbled together adjustments for each OS to split the differences. Fully embedding a browser is extremely storage inefficient but it does guarantee apps look identical regardless of platform.
Tmpod · 7 months ago
> That does help with the app sizes quite a bit: https://github.com/Elanis/web-to-desktop-framework-compariso...

Interesting resource, thanks!

Was not expecting the start up values for Tauri, they're abysmal ._. Welp, at least the executables are small.

m00dy · 7 months ago
I recently build a torrent streaming app on tauri (lemontv.xyz), it is just amazing framework, it is damn fast on every platform. The only issue is that accesing system api's a bit problematic especially on android side...I needed to get into JNI calls to run a background thread on android so that when the user puts the app on foreground, the app needs to do a bit more of buffering. I mean in general, Tauri is or could be one of the best options if you are writing rust backend and have cross platform requirements.
coldtea · 7 months ago
>"But Electron!" Yes, Electron hasn't taken the world by storm because it has two huge deficiencies: 1. It takes an enormous amount of resources including ram and disk.

Why would an "embedded browser engine" be any better? Electron after all is also a browser engine, and that's what makes it slow and bloated compared to native UI, not the embedded part (by which I asume you mean something like a browser engine wrapper widget).

>2. It has no native DOM API bindings so it takes even more ram and cpu to compile and run JS quickly.

Huh?

rafaelmn · 7 months ago
>Why would an "embedded browser engine" be any better? Electron after all is also a browser engine, and that's what makes it slow and bloated compared to native UI, not the embedded part (by which I asume you mean something like a browser engine wrapper widget).

There are legacy parts of browser layout that make it impossible(?) to optimize some rendering while being standards compatible. If you just chose a subset that is fast to implement and focused on being subset you narrow the scope of the project and enable optimizations.

Electron has to implement everything chrome has to support even though the apps running in it will never touch it.

Also web engines have to be heavily sandboxed because you cannot allow internet code break out of the sandbox.

Native apps shipped with electron already ship Node and just waste resources sandboxing stuff with security layers.

iczero · 7 months ago
For (2), I believe they want to interact with the DOM directly (via whatever language the rest of the app is written in) without needing to go through JavaScript.
mingodad · 7 months ago
No one mention Opera before adopting webkit/blink it was lightweight and fast. And even it's source code appeared in some places after a leak.
nicoburns · 7 months ago
> It has no native DOM API bindings so it takes even more ram and cpu to compile and run JS quickly.

By this, do you mean something like a C/C++/Rust API to the DOM?

swoorup · 7 months ago
I am betting my chips in dioxus. Looks like a very clean project although few critical parts missing.
amelius · 7 months ago
Except on iOS because Apple can't get its sandboxing act together.

Deleted Comment

tonyhart7 · 7 months ago
Yeah but I don't want touch JS for this
esad · 7 months ago
I think Servo's killer application would be a mobile-first browser for postmarketOS/Mobian/other mobile Linux distros. It's a weird vacuum because Firefox has its Android port, but when you run Firefox on small linux (touch)screen, the experience is very suboptimal. I'd call it unbearable if it wasn't for bunch of tweaks in form of https://gitlab.postmarketos.org/postmarketOS/mobile-config-f...

Chrome is no better, as it has a very weird hardcoded minimum window width of 500px.

spankalee · 7 months ago
I've long thought its killer feature would be embeddable cross-platform UI and native-wrapped web apps like Electron and Capacitor. For these cases it doesn't need to render the entire public web, but the subset used by the application developers. It's a much more tractable problem.

Chrome had a project a long time ago called Razor whose goal was to make a 120fps streamlined subset of the web platform for those types of use cases. They tried to throw away warts of the web that slowed down parsing and rendering like quirks modes, floats, negative margins, infinite entity expansion, element adoption, and probably most built-in elements, leaving a few core built-ins and custom elements.

Razor apps could have run on the web, and in a Razor runtime. Unfortunately, IMO, they kept removing things until they removed the document, and swapped in Dart for JS and the project became Flutter which is not very web-like at all.

I thought Razor was a neat idea, and Servo could really fill that space well.

elcritch · 7 months ago
Fascinating, and I’ve been working on a native UI project I call Figuro for a couple of years now (1) that’s built on the idea of simple nodes.

It’s surprising how similar to HTML it’s becoming. I feel like it's sorta an inverse of the Flutter story. Lately I’m working on adding a subset of CSS. Adding padding and margins too seems like a good idea too, etc. Part of me wonders how much of a webpage I could render with it.

1: https://github.com/elcritch/figuro

rafaelmn · 7 months ago
Yes this is the ideal space for a performance minded web rendering engine rewrite.

And if you do it well enough as a subset it can become the next standard where the modern web is just the subset, you can even integrate it with a legacy render where you fall back to legacy when you detect you cant handle it, and have the fast path for the subset.

pests · 7 months ago
Didn’t realize that was the backstory of Flutter, I thought this was headed in a different direction.

I heard the YouTube team did something similar for their embedded / resource-constrained environments where the client just renders barebones HTML/JS and only what is needed is implemented in the engine.

nulld3v · 7 months ago
Another similar project (alpha stage): https://github.com/DioxusLabs/blitz

And another (mature but proprietary): https://sciter.com/

kevingadd · 7 months ago
The minimum window width is a funny thing, Chrome has been steadily raising the minimum every time they make changes to the UI. It used to have a minimum around 320px and now on some configurations it's nearly 800px. There's an old open bug about it where people periodically comment to complain that it was raised again.
fabrice_d · 7 months ago
pipeline_peak · 7 months ago
> I think Servo's killer application would be a mobile-first browser for postmarketOS/Mobian/other mobile Linux distros

Are you suggesting that such an app would get people to go out of their way and use mobile Linux?

PartiallyTyped · 7 months ago
Huawei is doing that, with their own OS.
culi · 7 months ago
Ladybird and Servo are exciting and much needed projects since Microsoft abandoned their own independent browser engine to use Chromium.

If you didn't know you could see the massive progress both projects have made in web compatibility here: https://wpt.fyi/results/?label=master&product=chrome&product...

As of today, browsers pass this percent of tests:

  Chrome: 96.82%
  Firefox: 95.41%
  Safari: 94.97%
  Ladybird: 89.30%
  Servo: 78.61%

materielle · 7 months ago
One interesting thing covered in the Ladybird monthly update videos, is that most of the web platform tests are text encoding tests for Asian languages.

If you remove them, Ladybird is closer to 60% and Servo to 50%.

Still good, and the point still stands that they are making amazing progress. But probably more accurate because that last 10%-20% are going to get harder to chip away at.

culi · 7 months ago
That's interesting and it explains why the wpt.fyi website doesn't show a percentage but instead the number of tests.

There are tons of other examples of these easy points in the test suite. Ofc text encoding tests are important if we want the internet to truly be global

I guess these percentages are kinda useless by themselves but still useful to track progress when you put them together in a historical graph

IshKebab · 7 months ago
Yeah it's crazy that they don't weight the tests. AVIF support is 1 test, whereas WebCryptoAPI is 50k.
JimDabell · 7 months ago
Be careful you don’t mistake that for web standards compatibility.

There are many tests in there for non-standard Blink-only APIs that Google implemented unilaterally, which both Mozilla and Apple rejected on security and privacy grounds.

For instance WebUSB accounts for 845 tests, and WebNFC accounts for 173 tests. Neither of these are web standards, they are Blink-only Google APIs.

LeFantome · 7 months ago
While I don’t doubt that there are bogus tests in there, looking at how many of them Safari and Firefox pass does not indicate that they have rejected many of them.
ironhaven · 7 months ago
It may seem like a lot but there are 1.7 million web platform tests. Controversial chrome only web apis are few and far between the common features
IshKebab · 7 months ago
At this point the web is a de facto standard platform. The whatwg doesn't decide what makes it up any more than w3c did.

As well as browsers supporting features not endorsed by whatwg, there are plenty of features that they have endorsed that browser vendors didn't bother with.

upcoming-sesame · 7 months ago
I'm guessing that the "last 5% = 90% of the work" rule applies to browser engines as well ?
wobfan · 7 months ago
Idiot here: How long will it approximately take until we see a real Ladybird or Servo browser in production, that is actually usable and e.g. has addons?

Like, will it be 6-12 months, or more like 2-3 years?

brodo · 7 months ago
I think Andreas Kling said they aim for their first release in 2026.
a-dub · 7 months ago
what ever became of khtml? i remember back in the day it had the nicest codebase of all of the browser layout engines.
xnorswap · 7 months ago
Webkit was forked from khtml, but the original died along with Konqueror, which couldn't keep up with javascript API changes & performance.
madeofpalk · 7 months ago
Basically became webkit. Which google forked for Blink/Chrome
loeg · 7 months ago
It eventually forked into Webkit / Chrome.
yonatan8070 · 7 months ago
These are interesting stats, but it makes me wonder what those tests exactly are. Are there 3.18% of tests that no browser passes? How applicable are most of these tests to real world websites?
culi · 7 months ago
No, likely much less than 3.18%. Chrome passes the most but there are plenty of tests that only Chrome passes or only Chrome doesn't pass
wiz21c · 7 months ago
Are the last percents harder to complete ? (law of diminishing returns)
igrunert · 7 months ago
For Ladybird - Andreas Kling called out that the vast majority of "easy tests" are passing and each additional test is going to be more difficult to come by going forward.

https://www.youtube.com/watch?v=-l8epGysffQ (1 minute - 4 minute)

culi · 7 months ago
As another comment pointed out, some of them will never be implemented on purpose. These tests aren't all backed by web standards. E.g. one test suite is for compatibility with non-standard Blink APIs

Also there are new tests being added all the time

polyaniline · 7 months ago
Hasn't Servo been around much longer than Ladybird? Has it stagnated?
kibwen · 7 months ago
Servo was on a multi-year development hiatus, which is the reason this is news (see the graph in the article). In addition the original priority of Servo was not to broadly implement web standards, it was as a proving ground for Rust components to be uplifted into Firefox (I'm unclear whether or not those components, which have surely been continually developed since then, have been backported into Servo).
jillesvangurp · 7 months ago
Are there browsers that use servo; or plans to build one? If not, who is actually using servo and what for?
dblohm7 · 7 months ago
Firefox has used Servo's rendering and styling components for years now.
jillesvangurp · 7 months ago
Servo was of course based on the servo project in Mozilla. But that was discontinued years ago before that project was completed. I'm sure Mozilla still uses some of those components. But is servo actively contributing back to Mozilla at this point or is it more of a fork?
monroewalker · 7 months ago
If servo (or something like it) succeeds, would that mean potentially being able to swap out chromium in Electron? Would that help with performance / application size?
kibwen · 7 months ago
Long ago it was a goal of Servo to adhere to the Chromium embedding framework, and differentiate itself from Gecko by having a good embedding story. I'm unclear whether that is still a goal of the modern project, however.
ramon156 · 7 months ago
Why the big dip in PRs over the years? Was that the year it got discontinued?
pilaf · 7 months ago
I would guess so. Their blog also has a big gap between 2020 [1] (when the Servo team was laid off from Mozilla) and 2023 [2] when they found new funding and restarted development, with nothing else posted in between.

1: https://servo.org/blog/2020/11/17/servo-home/

2: https://servo.org/blog/2023/01/16/servo-2023/

Tsarp · 7 months ago
Wondering how useful this would be for the agentic workflows that need browsing. The open deep research tread from yesterday mentioned using a pure text based browser sort of thing to quickly get info.
infogulch · 7 months ago
Like the recently discussed Lightpanda?

Show HN: Lightpanda, an open-source headless browser in Zig | 318 points | 11 days ago | 137 comments | https://news.ycombinator.com/item?id=42817439

fbouvier · 7 months ago
Yes, argentic workflows are one of our use cases for Lightpanda.

We skip the graphical rendering of the web page for instant startup, fast execution and low resources usage.

petesergeant · 7 months ago
I have to imagine that the vast majority of those workflows are going to want to blend into real traffic as much as possible, which just means driving Chrome
PartiallyTyped · 7 months ago
Minor typo:

    from over an our to under 30 minutes.
s/our/hour/