Jacob Young
645ffe21cf
std.debug: rewrite panic
2026-02-12 13:16:26 -05:00
Meghan Denny
13f31bb3c3
std/c: glibc has supported arc4random_buf since 2.36
2026-02-11 15:29:51 -08:00
Andrew Kelley
b600b6e5e0
std.posix: remove close function
2026-02-11 23:37:31 +01:00
Andrew Kelley
ba293eb820
Revert "compiler: override debug_io in release + evented mode"
...
This reverts commit 6840326711 .
The commit bungled deinitialization in main.
2026-02-11 10:44:04 -08:00
Pivok
d4217e2119
zig libc: exp10, exp10f, pow10, pow10f ( #31163 )
...
See #30978 .
Commands i run:
```
$ stage3/bin/zig build -p stage4 -Denable-llvm -Dno-lib
$ stage4/bin/zig build test-libc -Dlibc-test-path=../../libc-test -Dtest-filter=exp10 -fqemu -fwasmtime --summary line
Build Summary: 725/737 steps succeeded (12 skipped)
```
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31163
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
Co-authored-by: Pivok <pivoc@protonmail.com >
Co-committed-by: Pivok <pivoc@protonmail.com >
2026-02-11 19:39:40 +01:00
Andrew Kelley
96bd268c8c
zig libc: simplify implementation
...
- use symbol export helper
- move all declarations from common.zig into c.zig
- correct documentation
- delete dead code
2026-02-11 07:58:11 +01:00
Andrew Kelley
6840326711
compiler: override debug_io in release + evented mode
...
to avoid a dependency on std.Io.Threaded in such case
2026-02-11 00:27:06 +01:00
Jacob Young
7369008d8c
Io.IoUring: implement some thread pool options and other cleanup
2026-02-10 23:45:48 +01:00
Khitiara
e314dadb01
Allow overriding std.Io at a namespace level.
...
This should only be used when the fundamental types break down, e.g. on freestanding or when adding support for a non-posix OS, where std.Io.File.Handle is set to void.
2026-02-10 21:07:53 +01:00
Andrew Kelley
bf1b9318a9
Merge pull request 'compiler_rt: common -> compiler_rt' ( #31169 ) from compiler-rt-cleanup-2 into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31169
2026-02-10 20:28:28 +01:00
Andrew Kelley
7fbeeca924
Merge pull request 'Linux 6.19' ( #31165 ) from alexrp/zig:linux-6.19 into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31165
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
2026-02-10 05:29:00 +01:00
Andrew Kelley
74608293af
compiler_rt: common -> compiler_rt
...
use the "symbol" helper function in all exports
move all declarations from common.zig to compiler_rt.zig
flatten the tree structure somewhat (move contents of tiny files into
parent files)
No functional changes.
2026-02-09 20:03:15 -08:00
Andrew Kelley
6c7814fabd
Merge pull request 'Autodoc: display line numbers in source code display' ( #31155 ) from nektro/fork-zig:nektro-patch-54643 into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31155
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
2026-02-10 01:43:12 +01:00
Andrew Kelley
b607b0c27a
Merge pull request 'IoUring: update to new Io APIs' ( #31158 ) from io-uring-update into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31158
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
2026-02-10 00:43:51 +01:00
Alex Rønne Petersen
fcf0fc225a
std.Target: update max Linux version to 6.19
2026-02-09 23:54:30 +01:00
Alex Rønne Petersen
7af9882c6d
libc: update Linux headers to 6.19
2026-02-09 23:54:30 +01:00
Alex Rønne Petersen
80db2e0b8b
std.os.linux: update syscalls for 6.19
2026-02-09 23:54:30 +01:00
Andrew Kelley
04c180c8e5
compiler_rt: partial cleanup
...
introduce `symbol` helper function and partially migrate to using it
2026-02-09 20:04:17 +01:00
Nils Koch
6473dc22fc
std.ArrayList: Fix compile error when @sizeOf(T) == 0
2026-02-09 19:59:09 +01:00
Jacob Young
7e8ee985e2
tracy: add fiber integration
2026-02-09 10:47:21 -05:00
Jacob Young
a28d57292f
IoUring: update to new Io APIs
2026-02-09 10:47:21 -05:00
Pivok
f1b2554023
libzigc: hypotf, hypotl ( #31150 )
...
Implements hypotf and hypotl for libzigc #30978 .
Continuation of #31104
Commands i run:
```
$ stage3/bin/zig build -p stage4 -Denable-llvm -Dno-lib
$ stage4/bin/zig build test-libc -Dlibc-test-path=../../libc-test -Dtest-filter=hypotf -fqemu -fwasmtime --summary line
Build Summary: 365/369 steps succeeded (4 skipped)
$ stage4/bin/zig build test-modules -Dtest-target-filter=windows -Dtest-filter=hypotf --summary line
Build Summary: 53/101 steps succeeded (48 skipped)
```
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31150
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
Co-authored-by: Pivok <pivoc@protonmail.com >
Co-committed-by: Pivok <pivoc@protonmail.com >
2026-02-09 07:59:40 +01:00
antme0
fb18f2096a
Allow build.zig scripts to define module definition files (.def) when building win32 dlls.
2026-02-09 07:58:13 +01:00
Meghan Denny
c99b43e3da
ArrayList.writer() removed in 57dbc9e74a
2026-02-08 21:24:22 -08:00
Meghan Denny
e4438a58ae
fatal removed in b745a96d20
2026-02-08 21:24:05 -08:00
Sam K
6c63926333
Autodoc: display line numbers in source code display
2026-02-08 19:26:48 -08:00
Ben Buhse
52a6242443
std.os.linux: add F_SEAL constants to F struct
...
Add the missing F_SEAL_SEAL, F_SEAL_SHRINK, F_SEAL_GROW, F_SEAL_WRITE,
F_SEAL_FUTURE_WRITE, and F_SEAL_EXEC constants used with
F.ADD_SEALS/F.GET_SEALS for memfd file sealing. These are defined in the
Linux kernel at include/uapi/linux/fcntl.h.
The FreeBSD equivalents already exist in std.c (freebsd.F),
but the Linux side was missing them.
2026-02-08 02:11:20 +01:00
angus
703df73f38
initialize mutex correctly in kqueue.zig
2026-02-07 14:19:29 +00:00
Jacob Young
b5bd494606
std.Threaded: replace more kernel32 functions with ntdll
2026-02-07 00:02:50 -05:00
Andrew Kelley
e661e78256
store the Manifest in the fork set
2026-02-06 13:21:13 -08:00
Andrew Kelley
3d33735d73
zig build: add --fork CLI argument
...
closes #31124
2026-02-06 12:36:29 -08:00
Andrew Kelley
7246eee1e7
std.Progress: add Node.startFmt
...
convenience method for starting a child node with a formatted string as
a name.
2026-02-05 16:50:41 -08:00
Andrew Kelley
ee21a1f988
fetch: implement recompression
...
After fetching a package and applying the filter by deleting files that
are not part of the hash, creates a recompressed $GLOBAL_CACHE/p/$PKG_HASH.tar.gz
Checking this cache before fetching network URLs is not yet implemented.
2026-02-05 16:50:41 -08:00
Andrew Kelley
76d275b20f
std.Io.Threaded: flatten some switch cases
2026-02-05 16:30:33 -08:00
Andrew Kelley
387d550b6c
compiler: remove btrfs workaround functionality
...
has been fixed in the kernel code for a while now
2026-02-05 16:30:33 -08:00
bgthompson
076f7e5bd5
removed reduntant @as() from switch in getDaysInMonth
2026-02-05 21:58:35 +01:00
Pivok
d0b39c7f2b
libzigc: hypot ( #31104 )
...
First time contribution.
Implements hypot for libzigc #30978 .
Commands i run:
```
$ stage3/bin/zig build -p stage4 -Denable-llvm -Dno-lib
$ stage4/bin/zig build test-libc -Dlibc-test-path=../../libc-test -Dtest-filter=hypot --summary line -fqemu -fwasmtime
Build Summary: 725/737 steps succeeded (12 skipped)
```
I also changed std.math.hypot becuase some libc-tests raised fp exceptions. Example:
```
../../libc-test/src/math/special/hypot.h:8: bad fp exception: RN hypot(0x1p-1074,0x0p+0)=0x1p-1074, want 0 got INEXACT|UNDERFLOW
../../libc-test/src/math/special/hypot.h:9: bad fp exception: RN hypot(0x1p-1074,-0x0p+0)=0x1p-1074, want 0 got INEXACT|UNDERFLOW
```
I also run this command as a quick sanity check:
```
$ stage4/bin/zig build test-std -Dtest-filter=hypot -Dtest-target-filter=x86_64-linux-musl --summary line
Build Summary: 5/5 steps succeeded; 136/136 tests passed
```
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31104
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
Co-authored-by: Pivok <pivoc@protonmail.com >
Co-committed-by: Pivok <pivoc@protonmail.com >
2026-02-05 21:57:32 +01:00
brickmonster
c38f9336a3
std.os.linux: fix test not building
2026-02-05 21:15:54 +01:00
Ryan Liptak
bcb5218a2b
Environ: reinstate null return on = in environment variable keys
...
Changes an assert back into a conditional to match the behavior of `getPosix`, see https://codeberg.org/ziglang/zig/pulls/31113#issuecomment-10371698 and https://github.com/ziglang/zig/issues/23331 .
Note: the conditional has been updated to also return null early on 0-length key lookups, since there's no need to iterate the block in that case.
For `Environ.Map`, validation of keys has been split into two categories: 'put' and 'fetch', each of which are tailored to the constraints that the implementation actually relies upon. Specifically:
- Hashing (fetching) requires the keys to be valid WTF-8 on Windows, but does not rely on any other properties of the keys (attempting to fetch `F\x00=` is not a problem, it just won't be found)
- `create{Posix,Windows}Block` relies on the Map to always have fully valid keys (no NUL, no `=` in an invalid location, no zero-length keys), which means that the 'put' APIs need to validate that incoming keys adhere to those properties.
The relevant assertions are now documented on each of the Map functions.
Also reinstates some test cases in the `env_vars` standalone test. Some of the reinstated tests are effectively just testing the Environ.Map implementation due to how `Environ.contains`, `Environ.getAlloc`, etc are implemented, but that is not inherent to those functions so the tests are still potentially relevant if e.g. `contains` is implemented in terms of `getPosix`/`getWindows` in the future (which is totally possible and maybe a good idea since constructing the whole map is not necessary for looking up one key).
2026-02-05 20:24:31 +01:00
Ivel
fa3228ae42
libc: reimplement swab in Zig ( #31130 )
...
This PR replaces the bundled musl swab() implementation with zig's one.
Contributes towards #30978 .
It looks like there are not test cases for swab() in test-libc.
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31130
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
Co-authored-by: Ivel <ivel.santos@proton.me >
Co-committed-by: Ivel <ivel.santos@proton.me >
2026-02-05 20:21:41 +01:00
Jacob Young
c77e7146f5
std.Threaded: replace console kernel32 functions with ntdll
2026-02-05 07:41:25 -05:00
Andrew Kelley
3078a3197b
std.Io.Threaded.dirCreateDirWindows: remove unexpected error handling
2026-02-04 16:30:19 -08:00
Andrew Kelley
0e7d00776e
std.Io.Threaded: inline OpenFile into dirCreateDirWindows
2026-02-04 16:30:19 -08:00
Andrew Kelley
3a5fff45ec
std: move os.windows.OpenFile into Io.Threaded
...
it needs cancelation integration
2026-02-04 16:30:17 -08:00
Andrew Kelley
2a193a3987
std: move GetFinalPathNameByHandle to Io.Threaded
...
unfortunately this function calls NtCreateFile so it has to participate
in cancelation
2026-02-04 16:27:13 -08:00
Andrew Kelley
fcef9905ae
Merge pull request 'std.Progress: implement inter-process progress reporting for windows' ( #31113 ) from threaded-win-cleanup into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31113
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
2026-02-05 01:24:18 +01:00
Jacob Young
71156aff80
std.Progress: implement ipc resource cleanup
2026-02-04 15:20:10 -05:00
Matthew Lugg
a816f9e245
std.Io.Threaded: use _lwp_park correctly for real this time?
2026-02-04 20:44:37 +01:00
Matthew Lugg
fcdde3e4c7
std.Io.Threaded: gracefully handle race leading to ESRCH in unpark()
2026-02-04 20:44:37 +01:00
Jacob Young
ffc6da29e3
std.Io.Threaded: implement and cleanup windows codepaths
2026-02-04 14:15:41 -05:00