I'll be very interested in how this AI port turns out. I am involved in a number of active projects that are being held back by the language / framework is holding back the project, but where a rewrite would be too big of a project to undertake by using only human power. I've had more success vibe coding Rust than I have in more dynamic languages. I suspect the strictness of the Rust compiler forces the AI agent to p…
Yes it generates trash Rust code. > Not sure. It could be just that I am less familiar with Rust so it feels like it's doing a better job. Ya think?
Zig → Rust porting guide
171–180 of 592 posts
Re: Zig → Rust porting guide
#172Earlier quoted context omitted.
They recently tried to upstream an improvement to zig, but were prevented from doing so because zig has a hard and fast "no AI code" rule. Whether you think this response is trying to put pressure on zig or whether they're just moving for practical reasons is up to you. It's probably a bit of both.
Even if AI had not been used, the changes would not have been upstreamed, see https://ziggit.dev/t/bun-s-zig-fork-got-4x-faster-compilatio... tl;dr the supposed improvements are not sound and the zig compiler has already gotten a whole lot faster
Re: Zig → Rust porting guide
#173Re: Zig → Rust porting guide
#174Re: Zig → Rust porting guide
#175Earlier quoted context omitted.
They recently tried to upstream an improvement to zig, but were prevented from doing so because zig has a hard and fast "no AI code" rule. Whether you think this response is trying to put pressure on zig or whether they're just moving for practical reasons is up to you. It's probably a bit of both.
seems easier to fork zig
Re: Zig → Rust porting guide
#176Earlier quoted context omitted.
Take off every Zig
It's time! https://xkcd.com/286/
Re: Zig → Rust porting guide
#177Earlier quoted context omitted.
They recently tried to upstream an improvement to zig, but were prevented from doing so because zig has a hard and fast "no AI code" rule. Whether you think this response is trying to put pressure on zig or whether they're just moving for practical reasons is up to you. It's probably a bit of both.
Makes me wonder why zig announced the strict LLM rule recently. I'm afraid one reason could be that zig doesn't want to accept code from the bun fork in the first place (because of LLM usage, deviation and other reasons)
Re: Zig → Rust porting guide
#178Earlier quoted context omitted.
> unless you feed it source Which isn't particularly difficult - the language docs and std source come with the installation, so all you need to do is tell Claude where those directories are in your skill/plugin/CLAUDE.md. > and guide it closely (in which case it's useful for focused work) It does struggle sometimes with writing code that compiles and uses the APIs correctly. My approach to that so far has been to wr…
You're already at a disadvantage having to stuff the context and spend extra tokens coercing the model in the correct direction compared to it already knowing what to do (rust, ts, go, etc.) Here, I just did a quick test with claude. 1. "make a simple tcp echo server that uses rust" compiles and runs - took a few seconds to generate. 2. "make a simple tcp echo server that uses zig" result: compile error, took literal…
1. the language and stdlib are written by people who know what they're doing 2. packages in the ecosystem, at the barest level, are written by those who didn't leave after a few compile errors they couldn't reason about
Re: Zig → Rust porting guide
#179Earlier quoted context omitted.
So if tomorrow Rust denied the "improvement" to upstream Rust then what's the next language they plan to vibe code it in?
C obviously.
Re: Zig → Rust porting guide
#180Earlier quoted context omitted.
This prompt defines the translation as a file for file, line for line port. Seems like historical knowledge will be fine.
Having dabbled with both Zig and Rust, they do things so fundamentally differently, it isn’t possible to do exact lines like that.
Whether or not they can clean it up is an interesting question.