zig
zig copied to clipboard
General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
I discovered Zig yesterday and have spent pretty much all my time since then delving into it and reading various materials on it. Loving it so far. One feature that...
Minimal repro: ```zig const std = @import("std"); pub fn makeArray() [4]u8 { var result = std.mem.zeroes([4]u8); std.mem.writeIntBig(u32, result[0..][0..4], 0xabcdabcd); return result; } const x = makeArray(); pub fn main() !void...
### Zig Version 0.10.0-dev.3952+9e070b653 ### Steps to Reproduce Attempt to compile: ```zig const T = enum(u8) { a = 0x12, b = 0x12, }; pub fn main() !void { const...
First time contributing, hope this PR is up to your standards. Similarly to #11925, this `peek` implementation technically does modify the internal `i` counter to speed up subsequent `peek` calls,...
### Zig Version 0.10.0-dev.3659+e5e6eb983 ### Steps to Reproduce ```zig const F = struct { fn function() callconv(.C) void {} }; test { comptime { _ = @export(F.function, .{ .name =...
### Zig Version 0.10.0-dev.2524+e9fc58eab ### Steps to Reproduce Build the `stage2` compiler and compile the following test program: ```zig const std = @import("std"); pub fn main() !void { var x:...
This is in direct contradiction to parts of #9646 and these two test cases https://github.com/ziglang/zig/blob/master/test/behavior/comptime_memory.zig#L319-L371. As discussed in the self hosted compiler meetings the justification for this is change is...
This enabled all of the behavior tests for the C backend that were passing and fixed all of the C warnings from the flags `-Wextra -Wall -pedantic` for the behavior...
This adds a function to `std.fs.path` returning the stem of the given path. I think this is a worthwhile addition in the long term. It's a pretty common function for...
There's probably plenty of room to optimize these further in the future, but for the moment this gives ~4-5x improvement on x86-64, and ~10x on M1 AArch64 Macs. These extensions...