Bun has been converted to rust. Now what?
Perceived goals and outcomes of the Rust port
- Main stated benefit: move from Zig to Rust while keeping behavior, with most tests still passing.
- Some see real gains: simpler build, explicit localization of unsafe code, potential for progressive hardening.
- Others think the rewrite is largely performative or a marketing stunt, especially given remaining unsafety and LLM involvement.
- A few note neutral-to-better benchmarks and smaller binaries as interesting Zig vs. Rust data points.
unsafe usage and memory safety
- Central concern: tens of thousands of
unsafeblocks, many generated by an LLM, undermine Rust’s core promise of memory safety. - Supporters argue that explicitly marked
unsafeis already an improvement over Zig/C: you get a concrete “to-fix” list. - Critics counter that if even one block is unsound, the entire program can exhibit undefined behavior; with “gazillions” of LLM-written blocks, that risk is high.
- Comparisons: Bun’s
unsafedensity is said to be roughly double Deno’s, though both must wrap unsafe C/C++ JS engines.
LLM-driven “vibe coding” and trust
- Strong disagreement over trusting a runtime mostly translated by an LLM:
- Some: translation with a good test suite is one of the best LLM use cases.
- Others: a runtime is foundational infrastructure; shipping a million lines of largely unread AI code is “blatantly irresponsible.”
- Debate over “vibecoding” as a label: some think it erases nuance about tooling vs. process; others use it as shorthand for low-rigor AI use.
- Concerns that heavy AI reliance erodes developers’ ability to judge code quality.
Tests, correctness, and safety measurement
- Broad agreement that high test pass rates prove behavioral equivalence, not memory safety.
- Some note the test suite itself was tweaked during the port, making exact “99.8%” numbers somewhat unclear.
- Emphasis that tests can’t cover all failure modes; deep understanding and review remain essential.
Process, idiomatic Rust, and future work
- Many doubt a one-week, million-line PR could have been seriously reviewed.
- Worries that the result is non-idiomatic Rust with Zig-style memory semantics, making long-term refactoring harder.
- Some argue the real work now is extensive, careful re-architecting to remove
unsafe; others suspect a fresh Rust design might have been better than a direct port.