100 karma · joined February 26, 2022
> Yes, that is 4 pairs of --s. This is because Bun will pass the first pair to another bun run command, the second will go to tauri dev, the third will go to vite dev, and finally the last set will go to Cargo when running the backend. It's a mess!
What I'm trying to say: There are use cases where areas of safety are required other than memory safety.
That is debatable. Spiritual explanations are just easier and we humans are lazy
[1] https://github.com/ziglang/zig/blob/f6c934677315665c140151b8...
[1] https://ziglang.org/documentation/0.10.1/#setRuntimeSafety
I really enjoy the balance of safety and control in Zig. I can build using Debug mode during development, turning nearly all my bugs into crashes which are easily fixable using in-browser source-level debugging. But in Release-Small mode the result is fast and more importantly really small since there's a 64kb cartridge limit.
Another factor is the Zig Standard Library which designed to be portable and usable on freestanding targets. I can not emphasize enough how pleasant this is. For example I can just use a `std.heap.FixedBufferAllocator` to back a `std.ArrayList` with no problem.
The comptime feature of Zig also comes in handy when you have to minimize code size.
The seamless C interop furthermore improves my productivity since I can just use any C code I like. I've used a C perlin noise library in a previous game for example, saving me a lot of time.
Plus I've used Zig for the previous WASM-4 jam and just liked it so I didn't bother trying any other language.