zlacker

[parent] [thread] 12 comments
1. reacto+(OP)[view] [source] 2025-12-02 19:22:18
This is a non sequitur. Both Rust and Zig and any other language has the ability to end in an exception state. Whether it be kernel exception, pointer exception, or Rust's panic! - these things exist.

The reason why you see so many GitHub issues about it is because that's where the development is. Deno is great. Bun is great. These two things can both be great and we don't have to choose sides. Deno has it's use case. Bun has it's. Deno want's to be secure and require permissions. Bun just wants to make clean, simple, projects. This fight between Rust vs The World is getting old. Rust isn't any "safer" when Deno can panic too.

replies(3): >>skipan+L3 >>satvik+G4 >>diarrh+M6
2. skipan+L3[view] [source] 2025-12-02 19:37:15
>>reacto+(OP)
I agree. Pointing at Github issues is a strange metric to me. If we want to use that as a canary then you shouldn't use Deno (2.4k open issues) or Bun (4.5k open issues) at all.
3. satvik+G4[view] [source] 2025-12-02 19:40:04
>>reacto+(OP)
Don't make a false equivalence, how many times does one get a panic from Deno versus a segmentation fault in Bun? It's not a similar number, and it's simply wrong to say that both are just as unsafe when that's plainly untrue.
replies(3): >>ricard+Br >>reacto+bB >>hu3+ER
4. diarrh+M6[view] [source] 2025-12-02 19:49:24
>>reacto+(OP)
> This is a non sequitur. Both Rust and Zig and any other language has the ability to end in an exception state.

There are degrees to this though. A panic + unwind in Rust is clean and _safe_, thus preferable to segfaults.

Java and Go are another similar example. Only in the latter can races on multi-word data structures lead to "arbitrary memory corruption" [1]. Even in those GC languages there's degrees to memory safety.

1: https://go.dev/ref/mem

replies(2): >>dranne+J7 >>ignora+kS3
◧◩
5. dranne+J7[view] [source] [discussion] 2025-12-02 19:53:08
>>diarrh+M6
I'll take a small panic and unwind any day over a total burnout crash. Matters in code and life.
◧◩
6. ricard+Br[view] [source] [discussion] 2025-12-02 21:32:26
>>satvik+G4
Anecodtally? Zero segfaults with bun since I started using it back in beta.
replies(1): >>satvik+L88
◧◩
7. reacto+bB[view] [source] [discussion] 2025-12-02 22:21:01
>>satvik+G4
The only time I got a segfault in Bun is when I used bun:ffi to wrap glfw and wgpu-native so I can threejs on the desktop. Ironically, the segfault was in wgpu. Which is Rust. But to be fair it was because the glfw surface had dirty flags for OpenGL and didn’t have the Vulkan extensions. So anyone would have faulted.
◧◩
8. hu3+ER[view] [source] [discussion] 2025-12-03 00:19:28
>>satvik+G4
I use Bun in production. Well, one of my clients.

We have yet to witness a segfault. Admitedly it's a bunch of micro services and not many requests/s (around 5k AVG).

◧◩
9. ignora+kS3[view] [source] [discussion] 2025-12-03 21:23:25
>>diarrh+M6
> A panic + unwind in Rust is clean and _safe_, thus preferable to segfaults

Curious about safety here: Are kernel / cross-thread resources (ex: a mutex/futex/fd) released on unwind (assuming the stack being unwound acquired those)?

replies(1): >>diarrh+m55
◧◩◪
10. diarrh+m55[view] [source] [discussion] 2025-12-04 08:04:47
>>ignora+kS3
Good question. For fds their Drop implementation closes them, yes. Rust Mutexes will be poisoned on panic (not unlocked). Not sure about futexes.
replies(1): >>reacto+F8a
◧◩◪
11. satvik+L88[view] [source] [discussion] 2025-12-05 04:03:50
>>ricard+Br
I'm talking statistically in terms of number of issues that reference segmentation faults in the Bun vs Deno GitHub repositories. Anecdata doesn't mean much.
◧◩◪◨
12. reacto+F8a[view] [source] [discussion] 2025-12-05 17:29:33
>>diarrh+m55
But if Rust panic’s, the entire process is dead, so everything gets reclaimed on exit by the kernel. Total annihilation.

All modern OS’s behave this way. When your process starts and is assigned an address, you get an area. It can balloon but it starts somewhere. When the process ends, that area is reclaimed.

replies(1): >>diarrh+GVa
◧◩◪◨⬒
13. diarrh+GVa[view] [source] [discussion] 2025-12-05 21:18:49
>>reacto+F8a
The OS is my GC. It's why I segfault liberally.
[go to top]