12 ms·
I work on Bun and this is my branch This whole thread is an overreaction. 302 comments about code that does not work. We haven’t committed to rewriting. There’
by Jarred 5mo ago
I work on Bun and this is my branch
This whole thread is an overreaction. 302 comments about code that does not work. We haven’t committed to rewriting. There’s a very high chance all this code gets thrown out completely.
I’m curious to see what a working version of this looks, what it feels like, how it performs and if/how hard it’d be to get it to pass Bun’s test suite and be maintainable. I’d like to be able to compare a viable Rust version and a Zig version side by side.
- vga1 4mo agoMight be a good idea to let AI handle social media. I'm not saying you're doing it badly, just that it doesn't seem like worth the drained energy to do manually.
- jorisw 4mo agoCan't think of a more stupid and detrimental way to use AI. Pretending to be a (particular) human on social media.
- hellohello2 4mo agoYou can view it as an overreaction, but also as a sign that your work is significant. It impressed some, and scared others. In any case, you made something interesting.
- hn_throwaway_99 4mo agoYou're replying to the original author of Bun. Given the usage of Bun, and the fact that his company (primarily him, actually) was recently acquired by Anthropic for what I'm guessing was a bajillion dollars, I think he probably already knows his work is significant and that he made something interesting.
- hellohello2 4mo agoLol! My bad, I wasn't aware it was the original author (my fault for replying with too little reading). In any case, I think what I said still applies to his LLM experiment.
- sp4cec0wb0y 4mo ago....you were saying?
- mfru 4mo agoJareds comment aged like milk
- mb2100 5mo agoWhat's the main motivation for considering Rust? For what it's worth, in my last experience with Bun[0] I ran into a couple of bugs where it seemed Rust could have helped, e.g. using Bun.write [0]: https://mastrojs.github.io/blog/2025-10-29-what-struggled-with-porting-mastro-to-bun/ https://mastrojs.github.io/blog/2025-10-29-what-struggled-wi...)
- novok 5mo agoWith AI agents and how good they are in doing "language translation" tasks against an identical target with a comprehensive test suite, you end up doing these things out of curiosity. The AI agent has the originals to test it's assumptions with too. I've had surprisingly good results from getting AI agents to take a script in shell, python or typescript and have it translate it into those other programming languages, including rust versions. Or swapping from one build system to another.
- tracker1 5mo agoTotally agreed... It enables you to try swapping out dependencies you might not otherwise even consider because of the cognitive load in trying to do so as an individual, and get it done/working in a few hours and a few days to follow in order to review. Or take on an additional/related feature (like Redis grepping over the new array data types). Because you can be relatively sure the borders are stable and you can limit the surface/scope.
- weli 5mo agoI love your work on bun. How do you feel about all the constant concerns being raised about the quality of the project lately? I understand some of them might just be typical twitter hate but some of them are real. And I think people are right to question why you are adding image processing or web views inside a javascript runtime when there are bugs affecting production that sit unaddressed. For example on of our biggest blockers right now is https://github.com/oven-sh/bun/issues/6608 https://github.com/oven-sh/bun/issues/6608 which was reported in 2023, still affecting us 3 years later.
- throwaway2037 5mo agoWhy not offer a bounty to get this issue fixed? Are you otherwise paying any money to the bun team?
- 2colours 5mo agoI think the question still deserves a proper answer.
- bouk 5mo agoNo, open-source maintainers don't owe you anything if you don't pay for it
- throwaway2037 4mo agoI have said the same many times here on HN. This in/famous blog post really changed my view: "Open Source Maintainers Owe You Nothing": https://mikemcquaid.com/open-source-maintainers-owe-you-nothing/ https://mikemcquaid.com/open-source-maintainers-owe-you-noth...
- Chris2048 5mo agoI have similar problems with product I do pay for, and I still get told I have no say. FO/OSS distinction is a red herring. At some point it need to be made clear; it's not a legal obligation, but a reputational challenge.
- sarreph 5mo agoIt is a pity that you can't make an experimental commit on an experimental branch without igniting a fire of delirium through some people who -- if they were able to put their emotional response aside for a minute and could weigh this up on the basis of merit -- would probably agree with the motivations for researching this approach. > if/how hard it’d be to get it to pass Bun’s test suite and be maintainable Every month brings new opportunities to completely abstract the process of porting code with agents, all using linguistics. What an exciting time. For those looking for a similarly interesting (and interestingly similar) example, see Cloudflare's port of Next.js[0], "vinext", from a couple of months ago. It had some teething problems at the start but I'm using it in a few production projects now with minimal issues. [0] - https://github.com/cloudflare/vinext https://github.com/cloudflare/vinext
- SergeAx 5mo agoI am a topic starter, and I had no emotional response, was just being curious. Never expected it will land at HN #1. I specifically posted the link to the first commit and not to the whole branch, because currently the prompt is the most interesting part.
- Hikikomori 5mo agoThe title kinda set the tone for this post.
- magicmicah85 5mo agoThe title is "Bun is being ported from Zig to Rust". The docs/PORTING.MD starts with "Zig → Rust porting guide" I don't think the tone was the problem.
- mi_lk 5mo agoImaging title it "Bun is being ported from Zig to Rust in an experimental branch" though. Not enough drama with that
- SergeAx 5mo agoThank you for the clarification! While you are here, can you elaborate on the method chosen? For example, why not write a conversion script for phase A? I mean, same Anthropic model will produce it in no time, prompting it is at the same cognitive load level, but you would have a deterministic result.
- dannersy 5mo agoI think the criticism is still a valid to an extent because I don't see how this would give you a good way to evaluate Zig vs. Rust. Maybe a better approach is to migrate a particularly problematic space and bench that on its own?
- _kblcuk_ 5mo agoIt's not like OP asked for any criticism to start with, right? This whole thread is pretty good example of why saying "Fools and children should never see half-finished work" exists. ¯\_(ツ)_/¯
- dannersy 5mo agoSince when was HN ever about asked for criticism?
- techsystems 5mo agoNot HN, but from my experience of over a decade, it's certainly US culture to criticise without expertise.
- dannersy 5mo agoI can say from expertise that vibing a full move of any project from one language to another is probably not a great way to evaluate if the decision is a good one. I got downvoted, maybe I said it too authoritatively. But hey, that is just like, my experienced opinion, man.
- xaxfixho 5mo ago[flagged]
- kennykartman 5mo agoThank you, Jarred, for your work. It’s unfortunate to see so much backlash toward legitimate research. Bun is often seen by some as “the flagship project for zig” - especially among those frustrated with rust who want zig to "win over rust" for whatever reasons. At the end of the day, you should do what makes the most sense for your project and your circumstances, regardless of the language or tools involved. Personally, I find this experiment interesting and I’m curious to see how it develops. Writing idiomatic rust requires a shift in mindset, so it’ll be worth watching how well LLMs adapt to that over time.
- CupricTea 5mo ago>who want zig to "win over rust" for whatever reasons I don't understand why this mentality is so common. Zig and Rust are both fine languages with markedly different design goals and they can coexist.
- kennykartman 4mo agoHonestly, I don't know. I think it's because of frustration, but the community attitude is part of it. I experienced first hand people frustrated with Rust moving to Zig and finding other people to pick onto Rust and finding fertile ground (especially if moderators and heads of the community let this kind of behavior continue).
- tracker1 5mo agoI can only speak for myself... but I've found at least Claude Opus to handle Rust very well, and in my own use cases WebAssembly (wasm) and FFI for interoperation with TS/JS has been pretty smooth.
- shevy-java 5mo ago> We haven’t committed to rewriting. There’s a very high chance all this code gets thrown out completely. Props for the effort man, but people have already picked up on Zig-to-Rust transition. Poor Zig folks ...
- a_shiine 4mo agoMore like poor Bun
- gozzoo 5mo ago[dead]
- jadbox 5mo agoI'm very curious what Zig vs Rust code looks like for the same project! What are your thoughts so far?
- conartist6 5mo agoHoping that an AI rewrite is thrown out. You may even be an OK programmer, but IF YOU AREN'T ABLE TO DO THE WORK I DON'T WANT TO USE IT. Not worth your time? Not worth my time.
- deleted 5mo ago[deleted]
- deleted 5mo ago[deleted]
- dcre 5mo agoMost of Bun’s code is already written by LLMs. If you feel that way, it’s already been too late for a while. Furthermore, we’re talking about a million line port done in a couple of days. The question of whether it’s worth the time looks extremely different if done by hand. It would take a year.
- conartist6 5mo agoThe "too late" argument isn't gonna fly with someone like me who has both the time and energy to own a Javascript runtime. Heck, I'm quickly becoming the most prolific author of the ES spec too.
- ForHackernews 5mo agoCool. Fork it and maintain your own runtime, then. Why are you complaining about what the bun team does with their project?
- conartist6 5mo agoCause I'm sick of this amateur hour shit
- 5mo ago
- sebastianconcpt 5mo agoCalm and curious about your results. I hope you get the code elegant and not only maintainable but future friendly and performant.
- psychoslave 5mo agoWill you have a way to measure the ecological impact it has to make such a throw away attempt? Not actually pointing on you or anyone in particular here to be clear. And if the answer would be "not much more than forgetting the light when leaving the toilets", certainly that would be a "go have fun" cheerleading on my part. But otherwise we collectively have to keep in mind that the prompt that we can throw mindlessly and without perceiving any direct negative feedback are possibly not anodyne. So if you can measure it, come back also with these numbers so we can all take that into consideration next time the thrill to run it just to see what happens rise in our mind. Thanks.
- kingstnap 5mo agoRight now it seems to say: > Showing 1,808 changed files with 790,916 additions and 151 deletions. Just looking at the git diff [0]. I looked at one of these rust port files [1]. Its 827 loc and apparently 7,576 tokens. So that gives you a first order guess that the full 700k additions is around 8 million output tokens. Obviously there are some tool calls, reasoning, reads of the zig version, and fixing compile errors as overhead. So I would guess maybe this is like 40 million tokens by multiplying by 5? If we guess that is around $200 to $500 in token spend. We can probably guess that it emits around the same as buying $100 in gas? Or like 50 or so kgs of CO2? [0] https://github.com/oven-sh/bun/compare/main...claude/phase-a-port https://github.com/oven-sh/bun/compare/main...claude/phase-a... [1] https://github.com/oven-sh/bun/blob/dacc59c62a8f93eabe6d9998312b92ff7c2f0c6e/src/runtime/socket/SSLConfig.rs https://github.com/oven-sh/bun/blob/dacc59c62a8f93eabe6d9998...
- psychoslave 4mo agoThanks, that's a really great answer. It feels odd that the same message can be thus down voted and give the impulse to provide courteous response with reasoning, metrics and values. Glory to your kindness and informarive way to react.
- tracker1 5mo agoLess than the impact of people who can't be bothered to remember basic historical facts or directions in terms of hitting Google services dozens of times a day across the population. Probably less than the impact of having dozens/hundreds of actual developers, each with a dedicated computer running for months/years in what it would take for a similar effort. If you want to go live in the woods and farm/hunt for yourself, feel free. I'd suggest you stay away from the museums with paint and not glue yourself to a car mfg.
- MisterTea 5mo agoAdvice for the future: experiments should be explicitly tagged as such. The commit message "docs: add Phase-A porting guide" says nothing about the experimental and looks like a planned move to rust. That message certainly looks very official to me. > This whole thread is an overreaction. 302 comments about code that does not work. We haven’t committed to rewriting. There’s a very high chance all this code gets thrown out completely. Trying to pass off a blunder like this like its no big deal is an insult to your users. You made a dumb mistake. Own it, be transparent and correct the problem that started this; namely, put some form of experimental tag in the commit message. Then say you made a simple mistake, sorry, and move on. Being dismissive is a defense mechanism that can arouse suspicion, as in are you now lying about the experimental state to quench the flame war? Not that I believe that but it can certainly now become conspiracy. Again, you can avoid all that with transparency.
- Tadpole9181 5mo agoOr we can stop being toxic to open source maintainers and acting like we own them or they owe us anything. A commit message on a random branch is not an obligation. Not telling random internet users what side projects they're working on is not a blunder. It quite frankly doesn't matter what you think looks official, it doesn't give you the right to treat people like this. It's so embarrassing to be a programmer some times, so many of my peers behaving like spoiled rotten brats.
- MisterTea 5mo ago> Or we can stop being toxic to open source maintainers and acting like we own them or they owe us anything. The majority of the community feels this way which says something. The author's reaction is to publicly display being upset and dismissive of the communities reaction. That is just making it worse. When you work on a project this big, more care is needed. The commit was an innocent mistake. The blunder is blowing off the communities response as overblown which it would be had the commit been tagged experimental. But it wasn't. And the author did themselves no favor blowing it off. If the author was smart, their reply would simply have been: Hello, To clarify, this is an experimental branch only. There are no plans to port, only experiment. I will tag the repo as such to ensure people understand its intention and avoid future misunderstandings. Nothing difficult to understand here.
- convolvatron 5mo agothe is lovely, how admirable that you have the space to do this. its very rare that we as a community take the time to actually implement a non trivial system in X and Y and look at the differences. so much discussion around these things is based on pointless tribalism. I'm sure recasting Bun in a new mold is going to be hugely informative about the structure of Bun itself, regardless of the outcome. would love to read a postmortem
- fithisux 5mo agoA research prototype. This is normal.