News for hackers. Stuff that matters.
Re:Claude Code uses Bun written in Rust now by Yokohiii on Monday July 20, 2026 @01:28AM (#48974663)
Can you elaborate on the unusual part?
Re:Claude Code uses Bun written in Rust now by WD-42 on Monday July 20, 2026 @01:39AM (#48974734)
All necessary memory is allocated at initialization. The application is not allowed any allocations during it's normal runtime. This is how it avoid memory bugs.

Not a lot of people write programs this way.

Re:Claude Code uses Bun written in Rust now by physicsguy on Monday July 20, 2026 @03:29AM (#48975372)
Static memory allocation is widely used in quite a bit of embedded software, particularly safety critical stuff. There it's often latency related since you don't want hangs while memory is allocated.

I've even seen it on some simulation software's core that was written in the 80s originally; at the time memory was much more constrained so allocating upfront meant you could check upfront whether the simulation could actually run or not vs crashing out part way through.

Re:Claude Code uses Bun written in Rust now by n6242 on Monday July 20, 2026 @03:24AM (#48975335)
I was just learning yesterday that's exactly what GTA did on PS2, which I thought was interesting. (Not to belittle your point, just giving an example)
Re:Claude Code uses Bun written in Rust now by adamrezich on Monday July 20, 2026 @10:48AM (#48979648)
This is how basically every console video game works.
Re:Claude Code uses Bun written in Rust now by NothingAboutAny on Monday July 20, 2026 @03:18AM (#48975300)
I do this in Unity because allocations/GC cause hitches. it's pretty normal thing to do there's even the built in pooling libraries so you can pre-allocate 10,000 gameobjects when the game starts. I haven't played with ECS/DOTS yet but I assume it does something similar.
Re:Claude Code uses Bun written in Rust now by ahoka on Monday July 20, 2026 @02:37AM (#48975020)
A lot of people write software like this when predictable latency is a hard requirement.
Re:Claude Code uses Bun written in Rust now by leonidasrup on Monday July 20, 2026 @11:48AM (#48980547)
Andrew Kelleys original motivation for creating Zig was language that allowed precise low-level control for real-time audio processing.

"Kelley describes why he created Zig, when other options including C, C++, Rust, and Go already exist. He said he set out to develop a digital audio workstation. He tried Go, but found interoperability with C libraries difficult, and said the garbage collector caused audio delays. He tried C++, or coding C-style using a C++ compiler, but found that small mistakes led to memory corruption bugs that took weeks to fix. He tried Rust but "really struggled to write code that would satisfy Rust's rules," and spent a month trying to make font rendering work."

https://www.theregister.com/software/2026/05/28/zig-creator-...

Re:Claude Code uses Bun written in Rust now by pton_xd on Monday July 20, 2026 @02:49AM (#48975109)
This is standard practice in the games industry.
Re:Claude Code uses Bun written in Rust now by tovej on Monday July 20, 2026 @09:08AM (#48978366)
I do. The only thing I need dynamic allocations for is queues of asynchronous events, and that's just because I'm too lazy to calculate an upper bound for how many there may be.