zig
zig copied to clipboard
General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
### Zig Version 0.9.1 ### Steps to Reproduce In order to reproduce the issue, some kind of bare metal aarch64 environment is required. In my case, it's a qemu aarch64...
This PR makes directEnumArrayLen public closes #8875
### Zig Version 0.10.0-dev.2993+0248073b9 ### Steps to Reproduce ```zig // build.zig const Builder = @import("std").build.Builder; pub fn build(b: *Builder) void { const exe = b.addExecutable("test", "test.zig"); exe.addCSourceFile("test.c", &[_][]const u8{ "-std=c99",...
```sh-session $ cat a.c extern char __libc_single_threaded; int main(void) { return __libc_single_threaded; } $ clang a.c $ zig build-exe a.c -lc ld.lld: error: undefined symbol: __libc_single_threaded >>> referenced by a.c:3...
This allows you to create a `DynamicBitSetUnmanaged` with a different backing integer type, useful for when being passed for example a `[*]u32` or `[*]u8` from an external API with no...
``` [nix-shell:~/dev/zig/build-release]$ stage3/bin/zig build test-run-translated-c /home/andy/.cache/zig/o/298d9a868ea257548e164645862426f6/source.zig:450:44: error: incompatible types: '*const c_int' and 'c_int' if (&add(@as(c_int, 1), @as(c_int, 2)) != @as(c_int, 3)) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /home/andy/.cache/zig/o/298d9a868ea257548e164645862426f6/source.zig:450:9: note: type '*const c_int' here if...
Currently we have `@Vector` for this, however, see #5207 and #6209. Array syntax is `[N]T`. This is a proposal for SIMD vector syntax to be `[|N|]T` instead of `@Vector(N, T)`....
LLVM 10 introduced nice [Matrix intrinsics](https://releases.llvm.org/10.0.0/docs/LangRef.html#matrix-intrinsics). Possible syntax: ```zig @Matrix(rows, cols, type) ``` Related issue: #903
Required for #1759. I wrote a simple project that verified the sizes against the headers at compile time: ```zig const std = @import("std"); // Vendored from std/c/freebsd.zig. // Change the...
```zig // test.zig pub fn main() void { foo(12, 23.5, .foo, "true"); } fn foo(a: u32, b: f64, c: enum {foo, bar}, d: []const u8) void { _ = a;...