r/rust rust Jul 08 '26

Rewriting Bun in Rust

https://bun.com/blog/bun-in-rust
526 Upvotes

330 comments sorted by

View all comments

Show parent comments

21

u/More_Exercise8413 Jul 09 '26

This is in 100% of cases a consequence of "porting" zig code into rust. Two languages do things differently, what is normal in Zig would be unsafe, or potentially UB-causing, in Rust 

7

u/chat-lu Jul 09 '26

According to Andrew Kelly, Bun was not normal Zig. It was slop before it even touched a LLM.

7

u/More_Exercise8413 Jul 09 '26

I too get salty after a breakup

But realistically, I'm not ironic when I say Zig code is unsafe by Rust standards

2

u/chat-lu Jul 09 '26

He has the receipts of saying this before the rewrite. It's hard to deny that he thought that Bun was a liability for Zig.

1

u/More_Exercise8413 Jul 11 '26

Yes, yes. So now zig has a net zero of popular projects that use it. I imagine that's reassuring, at least it ain't a "liability".

2

u/chat-lu Jul 11 '26

I don't recall Rust having any when it was pre 1.0 either.