Claude is an Electron App because we've lost native

(tonsky.me)

63 points | by todsacerdoti 5 hours ago ago

82 comments

  • pjmlp 4 hours ago

    Nah, some developers are lazy, that is all, lets not dance around the bush with that one.

    Most of those Electron folks would not manage to even write C applications on an Amiga, use Delphi, VB, or whatever.

    Educated on node and do not know anything else.

    Even doing a TUI seems like a revelation to current generations, something quite mudane and quite common on 1980's text based computing of Turbo Vision, Clipper and curses.

    • reactordev 4 hours ago

      They wrote a React TUI renderer, that’s what they did. Shame…

      I understand why, but there is such beauty in the simplicity of ansi.

      • pjmlp 3 hours ago

        The company that supposedly is selling that AI can do everything to replace us.

        • esafak 2 hours ago

          I see no contradiction. You could get replaced by an agent that spews out React TUIs; as if corporate buyers are going to care about the difference!

          • reactordev an hour ago

            That’s the hard swallow. End users only care about the UX and it working. They don’t care how succinct your code is. They indirectly care about its performance.

    • sehugg 3 hours ago

      Realize, though, that just grabbing a frame buffer is not a thing anymore. To render graphics you need GLES support through something like ANGLE, vectors and fonts via Skia, Unicode, etc. A web browser has those things. Any static binary bundling those things is also gonna be pretty large.

      And JavaScript is very good at backwards compatibility when you remove the churn of frameworks (unfortunately Electron doesn't guarantee compatibility quite as far back)

      • pjmlp 2 hours ago

        And CPUs are only sand powered by electricity.

        I do realise the need for abstractions and they do exist, provided there is actually the interest to learn them.

    • zadikian 3 hours ago

      At least it seems like a lot more apps are cross-platform than before. I wouldn't call the native devs lazy for not making a Mac version of their Windows app.

      • pjmlp 3 hours ago

        Agreed, yet back in the day we even managed to do that with applications being written in Assembly, in some cases.

        Uphill both ways, should be easy for a company doing C compilers with LLMs.

    • Iolaum 3 hours ago

      In an age where LLM's start writing applications why would this matter?

      • pjmlp 3 hours ago

        Yet another reason to have those LLMs create native applications, should be easy apparently.

  • rapnie 4 hours ago

    Besides going full native, a Tauri [0] app might have been another good alternative given they already use Rust. There are pros and cons to that choice, of course, and perhaps Tauri was considered and not chosen. Tauri plus Extism [1] would have been interesting, enabling polyglot plugin development via wasm. For Extism see also the list of known implementations [2].

    [0] https://tauri.app/

    [1] https://extism.org/

    [2] https://github.com/extism/extism/discussions/684

    • headcanon 3 hours ago

      +1 for Tauri, I've been using it for my recent vibe-coded experimental apps. Making rust the "center of gravity" for the app lets me use the best of all worlds:

      - declarative-ish UI in typescript with react

      - rust backend for performance-sensitive operations

      - I can run a python sidecar, bundled with the app, that lets me use python libraries if I need it

      If I can and it makes sense to, I'll pull functionality into rust progressively, but this give me a ton of flexibility and lets me use the best parts of each language/platform.

      Its fast too and doesn't use a ton of memory like electron apps do.

      • EduardoBautista 3 hours ago

        Also, Rust's strong and strict type system keeps Claude honest. It seems as if the big LLM models have trained on a lot of poorly written TypeScript because they tend to use type assertions such as `as any` and eslint disable comments.

        I had to add strict ESLint and TypeScript rules to keep guardrails on the coding agents.

      • rapnie 3 hours ago

        I added a list of known Extism implementers to my comment above, to take inspiration from should Extism be attractive to consider for you.

    • Joeboy 3 hours ago

      I find it a bit odd how much people talk up the Rust aspect of Tauri. For most cases you'll be writing a Typescript frontend and relying on boilerplate Rust + plugins for the backend. And I'd think most of the target audience would see that as a good thing.

      • rapnie 3 hours ago

        I am considering a Tauri app, but still wondering about architecture design choices, which the docs are sparse about. For instance the Web-side may constitute a more full-blown, say NextJS, webapp. And include the database persistance, say SQLite based, on the web side too, closest to the webapp. That goes against the sandboxing (and best-practice likely), where all platform-related side effects are dealt with Platform-side, implemented in Rust code. I wonder if it is a valid choice. There is a trade-off in more ease of use and straightforwardness vs. stricter sandboxing.

        • jemmyw 44 minutes ago

          At least with Tauri it's easy to both make the choice and change it later if you want to. I think the docs are sparse because it's your decision to make. I've done it both ways and there are pros and cons. If you use the sqlite plugin and write the actual statements on the JS side then you don't need to worry about the JS<->Rust interface and sharing types. Easier to just get going. If you write your own interface then you probably want to generate TS types from Rust. I think a big advantage to the Rust interface way is that it makes it easier to have the web side be dual purpose with the same code running on the web and in Tauri - the only difference being whether it invokes a tauri call or an API call.

      • francisl 2 hours ago

        I working on a project using tauri with htmx. I know a bit uncommon. But the backend part use axum and htmx. No Js/Ts UI. It's fast, reliable and it work well. Plus its easy to share/reuse the lib with the server/web.

    • oooyay 3 hours ago

      I use something similar to Tauri called Wails: https://wails.io/ that's Go-based.

      • tvink 2 hours ago

        Looks cool, but the phrase 'build applications with the flexibility and power of go' made me chuckle. Least damn flexible language in this whole space.

  • ttd 4 hours ago

    Some random thoughts, since I've had a similar train of thought for a while now.

    On one hand I also lament the amount of hardware-potential wastage that occurs with deep stacks of abstractions. On the other hand, I've evolved my perspective into feeling that the medium doesn't really matter as much as the result... and most software is about achieving a result. I still take personal joy in writing what I think is well-crafted code, and I also accept that that may become more niche as time goes on.

    To me this shift from software-as-craft to software-as-bulk-product has some similarities to the "pets vs cattle" mindset change when thinking about server / process orchestration and provisioning.

    Then also on the dismay of JS becoming even more entrenched as the lingua franca. There's every possibility that in a software-as-bulk-product world, LLM-driven development could land on a safer language due to efficiency gains from e.g. static type checking. Economically I wonder if an adoption of a different lingua franca could manifest by way of increasing LLM development speed / throughput.

    • usrnm 4 hours ago

      > LLM-driven development could land on a safer language

      Why does an LLM need to produce human readable code at all? Especially in a language optimized around preventing humans from making human mistakes. For now, sure, we're in the transitional period, but in the long run? Why?

      • jerf 3 hours ago

        From my post at https://jerf.org/iri/post/2026/what_value_code_in_ai_era/ , in a footnote:

        "It has been lost in AI money-grabbing frenzy but a few years ago we were talking a lot about AIs being “legible”, that they could explain their actions in human-comprehensible terms. “Running code we can examine” is the highest grade of legibility any AI system has produced to date. We should not give that away.

        "We will, of course. The Number Must Go Up. We aren’t very good at this sort of thinking.

        "But we shouldn’t."

      • mjr00 3 hours ago

        Because the traits that make code easy for LLMs to work on are the same that make it ideal for humans: predictable patterns, clearly named functions and variables, one canonical way to accomplish a task, logical separation of concerns, clear separation of layers of abstraction, etc. Ultimately human readability costs very little.

      • davorak 3 hours ago

        > For now, sure, we're in the transitional period, but in the long run? Why?

        Assuming that after the transitional period it will still be humans working with ai tools to build things where humans actually add value to the process. Will the human+ai where the ai can explain what the ai built in detail and the human leverages that to build something better, be more productive that the human+ai where the human does not leverage those details?

        That 'explanation' will be/can act as the human readable code or the equivalent. It does not need to be any coding language we know today however. The languages we have today are already abstractions and generalizations over architectures, OSs, etc and that 'explanation' will be different but in the same vein.

      • mandevil 3 hours ago

        I can't even imagine what "next token prediction" would look like generating x86 asm. Feels like 300 buffer overflows wearing a trench-coat, honestly.

        • zadikian 3 hours ago

          It'd just run out of tokens

      • recursive 3 hours ago

        So humans can verify that the code is behaving in the interests of humanity.

      • ttd 3 hours ago

        Well, IMO there's not much reason for an LLM to be trained to produce machine language, nor a functional binary blob appearing fully-formed from its head.

        If you take your question and look into the future, you might consider the existence of an LLM specifically trained to take high-level language inputs and produce machine code. Well, we already have that technology: we call it a compiler. Compilers exist, are (frequently) deterministic, and are generally exceedingly good at their job. Leaving this behind in favor of a complete English -> binary blob black box doesn't make much sense to me, logically or economically.

        I also think there is utility in humans being able to read the generated output. At the end of the day, we're the conscious ones here, we're the ones operating in meatspace, and we're driving the goals, outputs, etc. Reading and understanding the building blocks of what's driving our lives feels like a good thing to me. (I don't have many well-articulated thoughts about the concept of singularity, so I leave that to others to contemplate.)

      • zadikian 3 hours ago

        LLMs are better at dealing with human-readable code on their own too

      • IncreasePosts 3 hours ago

        For one thing, because it would be trained on human readable code.

      • Copyrightest 3 hours ago

        [dead]

  • il-b 2 hours ago

    Somehow, a CAD program, a 3D editor, a video editor, broadcasting software, a circuit simulation package, etc are all native applications with thousands of features each - yet native development has nothing to offer?

  • etothet 3 hours ago

    "The real reason is: native has nothing to offer."

    I get it, but this is a bit dramatic.

    One of the biggest challenges I've found with using non-native tools (and specifically the various frameworks that let you write JavaScript that compile to Native code) is that there is much less of a guarantee that the 3rd party solution will continue support for new OS versions. There's much less of a risk with that with 1st party solutions.

    Additionally, those 3rd parties are always chasing the 1st part vendor for features. Being far behind the regular cadence of releases can be quite inconvenient, despite any advantages initially gained.

  • rapnie 2 hours ago

    With regards to "we've lost native" isn't local-first the opportunity to bring it back in a paradigm shift that deals a blow to both the browser and cloud vendor hegemonies?

    https://lofi.so/

  • andyjohnson0 3 hours ago

    I felt that this article didn't provide strong justifications for some of its assertions.

    > Native APIs are terrible to use, and OS vendors use everything in their power to make you not want to develop native apps for their platform.

    Disagree. I'm most familiar with Windows and Android - but native apps on those platforms, snd also on Mac, look pretty good when using the default tools and libraries. Yes, its possible to use (say) material design and other ux-overkill approaches on native, but thats a choice just like it us for web apps.

    And OS vendors are very much incentivised to make natuve development as easy and painless as possible - because lock-in.

    > That explains the rise of Electron before LLM times,

    Disagree. The "rise of Electron" is due to the economics of skill-set convergence on JS, the ubiquity of the JS/HTML/CSS/Node stack platform, and many junior developers knowing little or nothing else.

    As for the rest: minor variations in traffic light positioning and corner radii are topical but hardly indicators of decaying platorms.

    • bloomca 3 hours ago

      The rise of Electron was purely because you can share the codebase for real with the web app (for lots of apps it is their main focus) and get cross-platform support for free.

      Native apps are not bad to develop when using Swift or C#, they are nice to use and their UI frameworks are fine, it's just that it requires a separate team. With Electron you need much less, simple as that.

      > As for the rest: minor variations in traffic light positioning and corner radii are topical but hardly indicators of decaying platorms.

      I think it shows how important the platform itself is to the company. The system settings app on macOS is literally slow to change the topic (the detail page is updated like ~500ms after clicking).

      I personally love to develop desktop apps but business-wise they rarely make sense these days.

    • bdangubic 3 hours ago

      > Disagree. The "rise of Electron" is due to the ubiquity of the JS/HTML/CSS/Node stack, and many junior developers knowing nothing else.

      with all due respect - hard disagree. in what place on Earth to Junior Devs make these types of decisions?? Or decision makers going “we got these Juniors that know JS so it is what is…”

      • nitwit005 3 hours ago

        I don't believe they were implying they would make the decision. It's expensive to have your team learn new skills from scratch, and management won't want to pay for that if they don't have to.

        • andyjohnson0 3 hours ago

          This is indeed what I meant. Thanks for stating it with more clarity than I was able to.

        • bdangubic 3 hours ago

          I have been coding for 30 years now and I have never encountered a technical decision like choosing technology (e.g. Electron) for anything important to the company being made with "oh, we must use X because so and so knows X"

          Maybe if there was a toss-up between X and Y or something like that but to flat-out pick Electron because you have people that knows JS is madness

          • andyjohnson0 2 hours ago

            I'm thirty+ years in too, and it happens all the time - particularly in smaller operations. Resourcing constraints, disinclination to provide training, tight deadlines, etc.

            • bdangubic an hour ago

              so interesting!! and scary :)

  • daxfohl 3 hours ago

    I imagine the first step would be for them to make a cross platform UI framework that's better than any existing options, and then port claude to it.

    Making five different apps just to claim "native" doesn't seem like a great choice, and obviously for now, delivering new claude features takes priority over a native graphics framework, so electron makes sense. But that doesn't mean it'll be on electron forever.

    • jxdxbx 3 hours ago

      When I complain about a lack of “native” software I pretty much always mean the platform-provided defaults. Not some cross-plaform UI toolkit that happens to be “native” code. Most apps that I see using QT on Mac or whatever would provably be better as Tauri apps.

    • ToucanLoucan 3 hours ago

      Respectfully: skill issue. My employer ships software native for Windows, Mac, iOS and Android. Different codebases for all (though they share a lot of common stuff), all maintained by a shockingly small team.

      It’s absolutely achievable if you give a shit about your products and I’m long over hearing the bevy of usual fucking excuses from software houses often magnitudes larger than us who struggle to even keep their electron shit working correctly.

    • jen20 3 hours ago

      Native is shorthand for "integrated into the platform". Lowest-common-denominator stuff that Electron gives feels correct nowhere (looking at you, Slack). The very best cross-platform applications implement their UI using the native platform idioms on the native platform technologies, and share the core of their logic. The current best example I have is Ghostty which feels perfectly at home on either macOS or Linux.

  • reconnecting 4 hours ago
  • goda90 4 hours ago

    Maybe the hardware supply crisis caused by demand for AI data centers will lead to a push for more efficient and backwards compatible client software.

  • nitwit005 3 hours ago

    Even if web rendering is the best technology possible, there's still plenty you could hypothetically optimize, like replacing the Javascript with native code, or cutting out unused features to get a smaller download.

    Ultimately, Claude having limitations is an issue. They can't just point it at the code base and ask it to make it faster.

    • written-beyond 3 hours ago

      You've basically described Flutter and Jetpack compose(for desktop). The problem really does turn into effort to pay off, even if we stayed with JS and the rendering engine, figured out a way to compile JS into native code and completely stripping all of the unused functionality and doing the same thing with the rendering engine. All of that would need to be made, it's not like electron apps literally crash you machine. You have metrics, hundreds of millions of devices running electron apps at a daily basis. Unless you make your own company, I don't think anyone can convince their leadership to take such a decision.

      • nitwit005 3 hours ago

        I'm not arguing for actually doing this, I'm just suggesting Claude's limitations are actually an issue (contrary to what the article asserts).

  • odiroot 3 hours ago

    I'd still take native KDE/Plasma apps over Electron any day. Just the performance and memory usage alone is worth it.

    Sublime Text feels so much snappier than VSCode, for another example. And I can leave it running for weeks without it leaking memory.

  • eikenberry 3 hours ago

    This wouldn't be an issue if they allowed 3rd party apps or priced their API competitively with their subscriptions. Free software normally fixes these types of problems but is prevented in this case.

  • giancarlostoro 3 hours ago

    I have been using Claude Code ironically enough to build native apps via Qt and Rust, the output is impressive. Might give writing an IRC client a shot and put it in GitHub.

  • asah 3 hours ago

    great post - let me add that native was forced into some of this by the web:

    1. locked up files ==> that's for security, which wasn't an issue in the 1990s.

    2. inconsistent look ==> people are embedding browsers inside apps for all sorts of reasons, ruining the "native" UI/UX even if the OS "look" were stable.

    It took a while, but once again open source and the web kinda won, though if you like consistency, then I agree it's a pyrrhic victory...

  • 3 hours ago
    [deleted]
  • zitterbewegung 3 hours ago

    X foundational model Apps UIs are electron apps because all of them are web first and App second and the easiest way to do this is being an Electron app.

    • zadikian an hour ago

      What's the advantage of their Electron apps vs using the web? I get that in theory you can use native-only pieces that a browser doesn't support, but in practice a lot of Electron apps are literally the website.

  • d0m 3 hours ago

    Apple/Google could easily make web apps native if they wanted

  • lapcat 4 hours ago

    It's weird for the author to mention Mac window buttons and corner radius as reasons to use Electron, because while the main content of Electron app windows is HTML, the Electron windows themselves and the window chrome are native, with the same buttons and corner radius as other apps on the system.

    Electron is a native wrapper for web content. The wrapper is still native.

    > Native APIs are terrible to use, and OS vendors use everything in their power to make you not want to develop native apps for their platform.

    I'm honestly not quite sure what the author means here.

    Web APIs are equally “terrible” in my opinion. In any case, you have to release an Electron app on Mac the same way you release any native app on Mac. The benefit of using web APIs is not that they are non-terrible but that you can share the same code as your website. And of course you can more easily find web developers than native developers. But that has nothing to do with whether or not the API is terrible. It’s just supply and demand.

    I’ll take AppKit and autolayout any day over CSS, ugh. CSS is the worst.

    • lxgr 3 hours ago

      > with the same buttons and corner radius as other apps on the system

      I just checked: No, the corner radius is different. I'm personally not very bothered by that, but it's just empirically true.

      > Electron is a native wrapper for web content. The wrapper is still native.

      In my view, the problem isn't that it's a wrapper, but rather that it's that it's a bad wrapper of a bad runtime (i.e. the incredibly bloated JS/web stack).

      • lapcat 3 hours ago

        > I just checked: No, the corner radius is different.

        It may depend on which SDK version the developer uses.

    • zadikian 3 hours ago

      UIKit etc never made sense to me after years, CSS also didn't make sense, but right out of the box I understood React. And with hooks, it's way less boilerplate than the UIKit ways.

      Separate from that, Apple doesn't seem to mind breaking native macOS apps, to the point where most devs treat native code like a liability on Mac but ok on Windows.

  • mushufasa 4 hours ago

    Perhaps a hot take, but I'm glad for electron apps because that also means they will be well supported on linux, which is almost never the target of native development.

    • tuetuopay 3 hours ago

      Conversely, an app using native toolkits (at least the Windows ones) will have better chances of running fine under Wine. I've recently had the (dis)pleasure of trying to run some .Net monstruosity with Wine, and oh my got did it not work for obscure reasons.

      But overall yeah, from a compatibility perspective, nothing beats Electron. I'm not sure we'd ever get an official Discord client on Linux otherwise.

      • lostmsu 2 hours ago

        Now if only Wine would work natively on Android

  • rvz 3 hours ago

    More like a skill issue, than 'losing native'.

  • drcongo 4 hours ago

    I really hate Electron, but something is so rotten under macOS that even some of Apple's own native apps are appalling. The Settings and Passwords apps are so bad as to be almost unusable, I'd love to know how and why they're that bad - are they catalyst, or just badly made?

    • nullbyte 3 hours ago

      They did something to Settings after MacOS Monterey that made it very slow. I miss the snappiness of the old app!

      • dilap 3 hours ago

        I don't know for a fact, but I'd bet a few digits of cold hard cash it's a SwiftUI rewrite that is to blame. (Any1 in the know want to chime in?)

        And yeah, it's terrible. Apple doesn't make good apps anymore.

        (This is part of why I think electron does so well -- it's not as good as a really good native app [e.g. Sublime Text], but it's way better than the sort of default whatever you'll get doing native. You get a lot of niceness that's built into the web stack.)

      • poszlem 3 hours ago

        Well, perhaps it has something to do with the fact that they started using webviews for stuff like system UI: https://blog.jim-nielsen.com/2022/inspecting-web-views-in-ma...

    • jen20 3 hours ago

      While there are missing features (e.g. ability to merge records), I have to say that Passwords.app is worlds ahead of 1Password since their electron rewrite. System Settings is not the best (mostly because the search is broken), but Passwords is sufficiently good that I haven't bothered looking what it's written using, whereas I can immediately tell with Electron.

      • bloomca 3 hours ago

        System Settings is so slow for the amount of contents it has that I have to say it is probably the worst offender per content capita

      • drcongo 3 hours ago

        Hard agree on 1Password. After Slack it's probably the worst Electron app on my Mac.

    • isjdisjdj 3 hours ago

      [dead]

  • fHr 3 hours ago

    Codex cli rust /thread

    • strongpigeon 3 hours ago

      But the Codex app is Electron based...

  • 1970-01-01 3 hours ago

    Isn't native just the CLI?

  • baggachipz 3 hours ago

    Clicks link, goes to blog site

    My eyes! The goggles, they do nothing!