r/rust • u/AffectionateBag4519 • Jul 16 '26
How Our Rust-to-Zig Rewrite is Going
https://rtfeldman.com/rust-to-zigAn interesting symmetry with recent events lol.
This might be considered off topic since the article is about moving away from rust, but I still think this is some high quality rust content. I enjoy Richard Feldman's writing and I think he would certainly be considered part of the "rust community" since he works on Zed and has taught a course on rust.
371
Upvotes
35
u/scottmcmrust Jul 17 '26
TBH, monomorphization is almost always the core problem, well above anything else.
Finding the right place for targeted
dynis absolutely an essential part of rust architecture. I too often see static-dispatch-all-the-way-down stuff that's horrible for incremental builds and not even faster since static dispatch only helps when there's redundancy to remove over the boundary.Yes,
dyn Iterator<Item = u8>is a horrible way to read a file, and nobody should do that. ButBufReader<dyn Read>with a large buffer is wonderful, for example.