3 ms·
Rust is really fun to work with and the compiler is great, just make sure the rewrite takes compile times into account since larger projects often have to be or
by inglor 5mo ago
Rust is really fun to work with and the compiler is great, just make sure the rewrite takes compile times into account since larger projects often have to be organized in a way that makes compilation reasonably fast.
- ignoramous 5mo agohow long does it take to compile? @jarredsumner: It's basically the same as in zig using our faster zig compiler. If we were using the upstream zig compiler, rust port would compile faster. https://x.com/jarredsumner/status/2053050239423312035 https://x.com/jarredsumner/status/2053050239423312035
- jorams 5mo agoThis is at least partially disingenuous. Zig is working on, and has already shipped for some situations, a faster compiler. Bun runs on an outdated version of Zig that doesn't include it.
- deleted 5mo ago[deleted]
- laurencerowe 5mo agoIn my experience Bun in Zig compiles more slowly than Deno in Rust.
- hiccuphippo 5mo agoSingle compiles for sure. Where Zig is optimizing compilation is in the incremental compiler, which I've seen compile the compiler itself in an instant after a single line change. Of course, that kind of speed is probably not interesting to some people if the AI is writing tons of lines of code before they go to the compilation step.
- laurencerowe 5mo agoI found making single line changes in Bun’s zig code led to very long compiles compared to doing the same in Rust code. It was a while ago though and maybe I was doing something wrong.
- cdud3 5mo agoProbably a very long time ago then. Try again with Zig 0.16. It's amazing how fast recompiles can be.
- lukaslalinsky 5mo agoThey can't, because Bun is tied to a fork of Zig 0.14 which is not compatible with regular Zig compiler.
- deleted 5mo ago[deleted]
- Jarred 5mo agoBun’s patched Zig is on Zig 0.15.1