zig
zig copied to clipboard
General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
When trying to compile ```zig export fn x() u0 { return 0; } ``` a panic happens only with a debug build of the compiler: ``` src/Sema.zig:23338:43: 0x9395c1 in explainWhyTypeIsNotExtern...
### Zig Version commit 7cf2cbb ### Steps to Reproduce and Observed Behavior Compiled llvm from source using make instead of Ninja using the instructions on the wiki. Used CC=gcc and...
This is a proposal to promote [`std.math.divCeil`](https://github.com/ziglang/zig/blob/38fc826a5a82bbe11a893be11d3cc1439c477ee8/lib/std/math.zig#L959-L980) to a `@divCeil` builtin. This discussion is very relevant: https://github.com/ziglang/zig/pull/15879#discussion_r1208557275 The main reason here would be that if we have `@divExact`, `@divFloor`, and...
The user can use std.testing.spawnExpectPanic() in a test to spawn a child process, which must panic or the test fails. Internally, - 1. is_panic_parentproc is set from the cli arguments...
I would argue that the input of 0 can happen pretty often and mathematically it makes more sense to actually return false rather than assert that the input can't be...
### Zig Version 0.11.0-dev.2680+a1aa55ebe ### Steps to Reproduce and Observed Behavior Sample code: ```zig const std = @import("std"); const os = std.os; pub fn main() !void { const sock =...
I noticed these things (see commits) when I was working on some other things. Let me explain the `std.builtin.StackTrace: don't print extra newline after stack trace` commit more: Currently there...
This **removes** `std.builtin.Version` in favor of `std.SemanticVersion`. I don't think this is something that belongs in std.builtin. * This avoids the confusion when you don't know which of the two...
### Zig Version 0.11.0-dev.3295+7cb2e653a ### Steps to Reproduce and Observed Behavior 1. Start a new project using `zig init-exe` 2. Make a slight modification to build.zig: ```zig pub fn build(b:...