Electrobun is still zig and doubling down on it
HN user
yoav
hey@yoav.codes
https://bsky.app/profile/yoav.codes
Better in every way
They want us to believe Mythos was so bad it kept shipping segfaults for the last 6 months.
And also that it’s capable and trustworthy enough to rewrite the whole runtime in another language flawlessly such that no human needs to code review?
Idiocracy.
That explains the massive rise in segfaults since they got acquired.
It’s approaching being as buggy as claude code which I’ve had to stop using even though I have 6 months free of max because it just crashes and freezes all the time.
Yes he said multiple times including to me yesterday that humans won’t code review as a matter of practice going forward.
Hi. Electrobun creator here.
I am building a new JS runtime called cottontail.
It’s just a prototype now but the goal is to have a huge standard library powered by native zig such that you don’t need npm.
So you’re right that npm is a disaster and I’m working on solving.
The video demos are wild, but also how many people are already shipping apps with Electrobun.
Hey HN, Electrobun creator here. Thanks for posting this.
We just hit v1 - stable which means I've locked down the architecture. If you run into any bugs or need specific apis that you miss from Electron or Tauri please open Github issues and I'll prioritize them. I shipped 50,000 lines of code changes stabilizing and polishing electrobun for v1 over the last month.
Here's a video demo of Colab (also open source) (a hybrid web browser + code editor + PTY terminal) that is built with Electrobun https://www.youtube.com/watch?v=WWTCqGmE86w
Electrobun uses the system webview by default, but a lot of the hello worlds feature the bundleCEF option. Because Electrobun is architected to be webview agnostic when servo and ladybird are ready they should be drop-in alternatives.
Electrobun apps also auto generate a zstd self-extraction wrapper and patch files with every release, so your initial download will be much smaller than if you'd used zip and your updates will be as small as 14KB so you can ship as often as you like without you or your users paying the bandwidth tax.
Electrobun is now v1 stable. Ship full cross platform desktop apps in a few MB, ship often with diff updates as small as 14KB.
Fun marketing experiment, but you basically implemented ralph wiggum in the cloud.
Claude code locally in a vm and/or with work trees will 1 shot far better without burning cloud infra cash.
I’d bet this ends up wasting more money and time than it’s worth in practice.
Are you kidding me? I heard there’s a whole entire planet of Mercury and it’s right next to the biggest fusion reactor in our solar system.
We just have to figure out how to nudge Mercury into the Sun… cheaply.
You make some very good points but I would argue that many if not all the people you observe “without introspection” have enough to know they’re getting dummer but they don’t care because they never liked the art of writing code itself or problem solving they just liked getting a paycheck and are relieved that they can still have output their managers don’t fire them over with far less effort.
They see the same thing as you but are overjoyed to power down their brain and spend more time thinking about their personal hobbies and sports and 90 day fiance instead of real problem solving or code.
I have been giving it about the same amount of context as a large github/jira/whatever issue.
But i’m giving it a goal with a fairly distant milestone where it needs to hit 5-10 smaller milestones and even for advanced ai mixing the system languages I’m mixing in this large project there are build errors it powers through on its own (fixing the building, linking, or syntax, or using the apis for the versions of all the things i’m using) and there are some combinations of tech (windowing, webviews, etc.) and some architectures of things that require it to try multiple approaches to succeed.
Sometimes it will ask like “how am i doing so far should i continue”, or can you run this visual thing and report back. But there can be 30-60 mins between it doing that.
It also has to scan a lot of files and find the things it needs to find to fill its own context. Like “let me examine how you implemented that on mac and windows and come up with a solution for linux”
Other times while it’s reasoning if i notice it’s going down a rabbit hole I’ll point it out and set it in the right direction without interrupting it and when it moves onto the next thought it’ll incorporate my suggestion but it didn’t really stop or need another big prompt or goal.
There are plenty of times where I do need to step in and baby it with small goals through something tricky or obscure. But even in those cases I don’t have to write any code directly i just ask it to do xyz small change and hand it back for me to test
I installed claude code (an agentic ai that runs on your machine and can browse and edit code, run the build, and use unix commands)
This has largely taken me out of the loop. I give it detailed task like I would a junior engineer, and we discuss approaches and align on direction, priorities, and goals, and it then goes off for literally hours iterating on the code.
I have done about 3 months worth of extremely complex engineering work in about a week since I started doing this.
It is a step change from trying to use the chat interface and copy/pasting snippets.
Once it’s going it writes code like a staff engineer.
There are some obscure bugs it can run into that it needs my 20 years of experience to unblock or unwind when it goes down a rabbit hole.
But it has accelerated my development 500x and while it’s iterating I’m not filling my mind with code and syntax and so on, I’m more like a tech lead or manager now. I’m in another room playing with my dog.
Maybe that’s because the AI pushers are compensating for already not being as good.
What happens when other yous start using ai. I suspect they will obv outperform you just in sheer typing speed.
I’m building Electrobun (https://github.com/blackboardsh/electrobun)
It’s an alternative to Electron/Tauri that uses Bun.
It has a bsdiff based update mechanism that lets you ship updates as small as 4KB, a custom zstd self extractor that makes your app bundle as small as 12MB, and more.
I’m currently working on adding Windows and Linux support.
I don’t want to be _that_ guy but I want this for zig instead of rust.
I’m using bun for the main process. Bun runs a zig binary which can call objc/c methods. So the “main native application thread” is technically the zig process.
Then there’s all kinds of fancy rpc between bun and zig and between bun and browser contexts.
https://www.eggbun.sh/ is built with Electrobun.
Hey hn! Author here:
Thanks to whoever submitted.
Electrobun is in the very early stages. The roadmap is a bit out of date. Here are some highlights:
- it’s like Tauri in that it uses the system webview and does not bundle chromium
- it’s like Electron in that it bundles Bun instead of Node for the main process so you just write typescript for both the main and browser contexts
- native bindings written in c/objc with a zig wrapper that the bun process runs
- it will be cross platform, but working on stability first
- the cli handles updates code signing and everything else you need and outputs build artifacts that you just need to upload to S3 or any static file host.
- it has a custom optimized bsdiff implementation in zig that autogenerates updates for your app as small as 4KB
- it has a custom zig self extracting mechanism that uses zstd so your initial download is also as small as can be.
- it has a custom encrypted easy to use RPC mechanism between bun and browser processes where you just write method signatures and handlers.
- it has a custom OOPIF implementation so you can embed isolated browser contexts with your html <electrobun-webview> element that are performant and easy to use so you could build a multi tab web browser with it if you wanted.
The number 1 request I get from people is to add the ability to optionally bundle chromium.
I personally prefer the system webview because you don’t have to rush update your app for every chromium security update. And on the web making things cross browser is a normal part of the job and instinct imo.
But there are a ton of early startups that only have bandwidth to support chrome/chromium in their complex webapps and want a quick way to port their web app to desktop app. For them taking on the security burden and increasing bundle size is a good tradeoff to getting that consistency.
Luckily electrobun has a custom zig bsdiff implementation that generates update diffs as small as 4KB and self extracting executable that uses zstd so at least the file size is less relevant of a concern compared to electron.
Originally I had it going via browser -> postmessage -> zig -> bun via named pipes and then bun -> zig via named pipe -> js via evaluate js.
I’m building https://colab.sh/ with electrobun and that rpc was pretty slow when trying to load multi MB files in the code editor.
Last week I added an encrypted socket rpc option directly between bun and browser.
Loading a 2MB file went from a few seconds to 400ms.
I made it so that in contexts where CORS allows it automatically upgrades to the socket based faster RPC.
That’s via RPC though. electrobun also exposes a custom views:// scheme in the browser context that can load files directly from specific sandboxed places in the file system. More to improve there but for a very big file you’d be better off writing it to the file system that would be much faster.
It’s only been a few months but yes it’s a huge undertaking.
I’m only picking up steam though and my whole career has been taking on these kinds of huge projects so it’s just getting started.
It’s still early and it’s just me working on it so I’m trying to get to stability and then building for (distribute apps to) windows and linux before making all the cli stuff work to let you dev on other OSes.
So “no immediate plans” means check back next year after the 1.0.0 release
Native bindings written in c/objc and a zig binary that bun spawns.
Why would they pay retail for the car once it’s past the prototype stage.
They’d just make their own like zoox.
Take a look at Electrobun. It’s a Tauri alternative where you write typescript instead of rust. App bundles as small as 16MB and it creates update patches for your app as small as 4KB.
Written in zig and Bun, and uses the system webview by default.
A new batteries-included app framework for writing fast and tiny desktop apps in typescript.
Like electron but under the hood it uses bun and zig, and the system webview by default.
Like Tauri but you use typescript instead of rust.
batteries-included: a cli to build, code sign, bundle, create tiny 4KB diffs for updates, all you need is S3 or similar to host the artifacts.
if something happens like malware from an npm install’s dependency of a dependency of a dependency, and whatever protections they mandated would have caught it you will be personally financially liable for damages.
So not only is it morally wrong, it’s also unnecessarily risky.
If it’s inconvenient to carry two laptops around consider partitioning your hard drive, but be aware that certain profile management software can brick the entire machine remotely if/when they want while others like a typical vanta install will tend to stay within a partition.
You just invented a mid-level engineer.
If you manage to have more breakthroughs to senior then you can maybe leave it unattended for a few months but not if the product team is inexperienced or strong willed. The code will still end up as unmaintainable spaghetti.
So you need more breakthroughs to achieve staff or higher which requires a lot more agency and initiative on the part of the bot to push past what your team mates think they want and do what actually needs to be done modifying not only the code and the requirements but the process that leads to miscommunication and inefficiencies within the org.
If you manage to invent a bot that knows what’s better for the people prompting it and acts on that then you’ve potentially also violated the first law of robotics and created a death bot.
And boy oh boy would it be astronomically expensive to run.