zig
zig copied to clipboard
General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
Closes #19265 There are two commits in this PR: the first one implements the "traditional" Markdown autolink syntax, using `` to delimit the link, and the second one extends the...
### Zig Version 0.12.0-dev.3328+5cd7fef17 ### Steps to Reproduce and Observed Behavior It looks like it doesn't actually fail (binary is created in ./zig-out/bin), but there are some errors shown ```...
### Zig Version 0.12.0-dev.3381+7057bffc1 ### Steps to Reproduce and Observed Behavior **Scenario 1:** ```zig inline fn repro() void { @panic(""); } pub fn main() void { repro(); } ``` Output:...
Closes #18987 Follow-up to #18778 (which added lazy dependencies) and the discussion in #18808 that followed This adds `b.lazyImport`, which (in the context of a build script) is to `@import`...
An illustrative proof of concept accompanying #19207 - removes the `math.complex` namespace - moves `math.complex.arg/conj/proj` to `math.arg/conj/proj` - makes various `math.*` functions accept both real arguments as well as structs...
This updates `std.zig.fmtId` to support conditionally `@""` escaping primitives and the reserved `_` identifier via format specifiers: - `{}`: escape invalid identifiers, identifiers that shadow primitives and the reserved `_`...
Closes #17238. Removes `std.Build.anonymousDependency` and makes `std.Build.dependencyInner` private. Standalone and linker tests depended heavily on `b.anonymousDependency`, so the bulk effort of this PR revolves around converting them into to proper...
## Summary Stack capturing lambdas are normally unsafe, since the lambda may have a lifetime longer than the calling function. This proposal introduces a new type of lambda that is...
This MR ensures the strings used in the Step.Fmt belong to the builder, which prevents a use-after-free footgun in certain cases. e.g. ```zig const std = @import("std"); pub fn build(b:...
Discovered in #19347 ```zig export fn entry() void { comptime testFlagsInPackedUnionAtOffset(); } fn testFlagsInPackedUnionAtOffset() void { const FlagBits = packed union { base_flags: packed union { flags: packed struct(u4) {...