logoalt Hacker News

Animatsyesterday at 10:20 AM3 repliesview on HN

Oh, they're converting Bun to unsafe rust. That's easy, but useless. That's the sort of thing c2rust does - transpile to an low level language which is unsafe Rust with a set of functions that unsafely emulate C pointer semantics. You don't need an LLM for that.

There's no point. It's not doing the job DARPA's TRACTOR program is trying to do - translate C to safe Rust. I've used c2rust. It works, but what you get out is like compiler output, not something you can work on.


Replies

Aurornisyesterday at 1:54 PM

> Oh, they're converting Bun to unsafe rust. That's easy, but useless.

You really need to escape the Zig vs Rust language wars bubble to get a real read on what Bun was doing.

They started by attempting a more direct translation. Not quite transliteration but close. At this stage they wanted to bootstrap the codebase into Rust as quickly as possible using parallel agent sessions, which requires minimizing the number of refactors that cut across the codebase. After it was bootstrapped into Rust they continued on the rewrite to take advantage of Rust’s features.

The anti-Rust side has been clinging to that first step as evidence that it’s all broken, ignoring the fact that it was an intermediate step.

The “unsafe” part is also confusing a lot of non-Rust devs who don’t understand that unsafe is used in cases of crossing FFI boundaries, which Bun does a lot of by nature

cyberpunkyesterday at 1:46 PM

Isn’t the point that it doesn’t matter if humans can work on it, as long as the AIs can?

15155yesterday at 1:08 PM

> That's easy, but useless

The Rust toolchain is a delight in comparison to Zig's, and the unsafe code only need be temporary until humans (or, gasp, AI) address each class of underlying issue.

This is a no-worse-off state to improve from.