Bun ported to Rust in 6 days
99.8% of bun’s pre-existing test suite passes on Linux x64 glibc in the rust rewrite

it’s basically the same codebase except now we can have the compiler enforce the lifetimes of types and we get destructors when we want them. and the ugly parts look uglier (unsafe) which encourages refactoring.
why: I am so tired of worrying about & spending lots of time fixing memory leaks and crashes and stability issues. it would be so nice if the language provided more powerful tools for preventing these things.
there will be a blog post about this. on what this means for bun, benchmarks, memory usage, maintainability going forward, and also the literal process of doing this (it wasn’t just “claude, rewrite bun in rust. make no mistakes”) this is a 960,000 LOC rewrite, the code truly works, passing the test suite on Linux and soon other platforms. e2e I started working on this 6 days ago. this would’ve been a massive amount of work by hand.
@doodlestein I’ll do my own libc before that happens

@capajj there’ll be a blog post
@mutewinter 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
Схожі новини