zig
zig copied to clipboard
General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
I propose adding a function with a name such as `setAbortSignalHandler` to `std.debug`. ## Motivation `std.debug.setAbortSignalHandler` is supposed to make it easier to catch an abort signal (mainly caused by...
### Zig Version 0.10.0-dev.4324+c23b3e6fd ### Steps to Reproduce and Observed Behavior This is probably not a fully minimal example but I'm not fluent in Zig yet: ```rs const std =...
### Zig Version 0.10.0-dev.4707+209a0d2a8 ### Steps to Reproduce and Observed Behavior ```zig pub fn Bar(comptime T: type) type { _ = T; @compileError("error"); } pub fn foo(x: anytype) Bar(x) {}...
This fixes the broken terminal for me and thus fixes #13198. Source: https://github.com/torvalds/linux/blob/9abf2313adc1ca1b6180c508c25f22f9395cc780/arch/mips/include/uapi/asm/ioctls.h
### Zig Version 0.10.0 ### Steps to Reproduce and Observed Behavior ```zig fn foo(bar: u32) void { foo(bar); } ``` ### Expected Behavior Report a `unused function parameter` error with...
### Zig Version 0.11.0-dev.6840+28288dcbb ### Steps to Reproduce and Observed Behavior This snippet results in a compile failure: ```zig comptime { const prefix = "myprefix_"; for (@typeInfo(@This()).Struct.decls) |declaration| { if...
Calling os.write() on a peer-closed socket without the `MSG_NOSIGNAL` flag triggers a SIGPIPE, rather than return an EPIPE errno.
Adding an error message seems to be the only reasonable way to handle this. Otherwise we'd need to have a memory region that contains the sentinel value. However I took...
### Zig Version 0.11.0-dev.63+8c4faa5f3 ### Steps to Reproduce and Observed Behavior I used to be able to create error unions using `@field`: ``` const std = @import("std"); pub fn main()...