Remix.run Logo
satvikpendem 4 hours ago

Search for pointer exceptions or core dumps on Bun's GitHub issues and you'll see why people (should) use Deno over Bun, if only because Rust is a way more safe language than Zig.

reactordev 3 hours ago | parent | next [-]

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.

satvikpendem 3 hours ago | parent | next [-]

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.

reactordev 20 minutes ago | parent | next [-]

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.

ricardobeat an hour ago | parent | prev [-]

Anecodtally? Zero segfaults with bun since I started using it back in beta.

diarrhea 3 hours ago | parent | prev | next [-]

> 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

drannex 3 hours ago | parent [-]

I'll take a small panic and unwind any day over a total burnout crash. Matters in code and life.

skipants 3 hours ago | parent | prev [-]

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.

rvrb 3 hours ago | parent | prev [-]

I haven't verified this, but I would be willing to bet that most of Bun's issues here have more to do with interfacing with JavaScriptCore through the C FFI than Zig itself. this is as much a problem in Rust as it is in Zig. in fact, it has been argued that writing unsafe Zig is safer than writing unsafe Rust: https://zackoverflow.dev/writing/unsafe-rust-vs-zig/

polkchip2019 26 minutes ago | parent | next [-]

As someone who has researched the internals of Deno and Bun, your unverified vibe thoughts are flat out wrong. Bun is newer and buggier and that's just the way things go sometimes. You'll get over it.

timeon 2 hours ago | parent | prev [-]

[flagged]

rvrb 2 hours ago | parent [-]

[flagged]