zig
zig copied to clipboard
General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
### Zig Version 26e98391322645f2d09aaaaf36d94cae06424a18 ### Steps to Reproduce Within the zig folder: ``` mkdir build-release pushd build-release "c:\Program Files\CMake\bin\cmake.exe" .. -Thost=x64 -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH=e:\dev\llvm+clang+lld-14.0.6-x86_64-windows-msvc-release-mt -DCMAKE_BUILD_TYPE=Release...
### Zig Version 0.11.0-dev.18+81c27677d ### Steps to Reproduce and Observed Behavior Given two files with a missing identifier declaration, the error trace will differ in order between invocations of `zig`...
### Zig Version 0.10.0-dev.3838+77f31ebbb ### Steps to Reproduce ``` $ echo | zig cc -x c -c - -o x.o LLD Link... ld.lld: error: cannot open -: No such file...
### Zig Version 0.11.0-dev.12+ebf9ffd34 ### Steps to Reproduce ```zig export fn entry() void { var a: ?u32 = 1234; var b: u32 = 2000; var c = if (a) |d|...
Enum Arrays
This was originally proposed by @raulgrell here: https://github.com/zig-lang/zig/issues/770#issuecomment-368323984 What do you think of an enum array? It has a length equal to the member count of the enum and can...
### Zig Version 0.10.0 ### Steps to Reproduce and Observed Behavior I've encountered this issue while working on a protobuf implementation. The following is the smallest repro i can make....
### Zig Version 0.10.0-dev.2836+2360f8c49 ### Steps to Reproduce ```zig pub const io_mode = .evented; const std = @import("std"); pub fn fetch_item(allocator: std.mem.Allocator, cmd: []const u8, item: []const u8) void {...
Note: I think I'm okay to make this proposal based on what Vexu said in https://github.com/ziglang/zig/issues/13244#issuecomment-1287103168, since this is a small `std` change which doesn't impact compiler implementation and removes...
### Zig Version 0.11.0-dev.12+ebf9ffd34 ### Steps to Reproduce and Observed Behavior In build.zig: ```zig // ... const lib = b.addStaticLibrary("scanner", "scanner.zig"); lib.ofmt = .c; // ... ``` Then run `zig...
### Zig Version 0.11.0-dev.3+0bbb00035 ### Steps to Reproduce and Observed Behavior ```zig const Foo = packed struct(u32) { x: u1, }; fn bar(_: Foo) callconv(.C) void {} pub fn main()...