Andrew Kelley
cbd75b484f
std.posix: remove recvfrom, recvmsg
...
see #6600
2026-01-07 17:33:07 -08:00
Andrew Kelley
d96d735338
posix: remove send, sendto, sendmsg
...
see #6600
2026-01-07 17:33:07 -08:00
Andrew Kelley
791baefff2
goodbye posix.nanosleep
...
see #6600
2026-01-07 17:33:07 -08:00
Andrew Kelley
45b931a23f
goodbye posix.fork
...
see #6600
nobody should be using fork anyway, especially Redis
2026-01-07 17:33:07 -08:00
Andrew Kelley
3961fe3de9
std: move posix.kevent to Io.Kqueue
2026-01-07 17:33:07 -08:00
Andrew Kelley
2c6304efc7
std: move posix.kqueue to Io.Kqueue.createFileDescriptor
2026-01-07 17:33:07 -08:00
Andrew Kelley
be0a4dc299
goodbye posix.fstatat
...
see #6600
2026-01-07 17:33:07 -08:00
Andrew Kelley
829afe98d1
std.posix: remove getsockopt, getsockoptError
...
see #6600
2026-01-07 17:33:07 -08:00
Andrew Kelley
02c260dd06
goodbye posix.getsockname
...
see #6600
2026-01-07 17:33:07 -08:00
Andrew Kelley
1b43f27a91
std.posix: delete epoll APIs
...
see #6600
2026-01-07 17:33:07 -08:00
Andrew Kelley
55ad03e261
goodbye posix.accept
...
see #6600
2026-01-07 17:33:06 -08:00
Andrew Kelley
c89df809b9
goodbye posix.listen
...
see #6600
2026-01-07 17:33:06 -08:00
Andrew Kelley
4a49546f59
goodbye posix.bind
...
see #6600
2026-01-07 17:33:06 -08:00
Andrew Kelley
ed4dfdcff0
goodbye posix.shutdown
...
see #6600
2026-01-07 17:33:06 -08:00
Andrew Kelley
d10a730480
goodbye posix.socket
...
see #6600
2026-01-07 17:33:06 -08:00
Andrew Kelley
ceae9600e3
std.posix: remove setuid, seteuid, setgid, setegid, getuid, etc
...
applications and libraries should reach for the lower level APIs instead
2026-01-07 17:33:06 -08:00
Andrew Kelley
213ef95346
goodbye posix.open
...
see #6600
2026-01-07 17:33:06 -08:00
Andrew Kelley
2f372b3dc0
goodbye posix.write
...
see #6600
2026-01-07 17:33:06 -08:00
Andrew Kelley
520397b48f
tests: delete redundant cases
...
These were originally supposed to be incremental test cases but have
long since been made redundant.
2026-01-07 17:33:06 -08:00
Andrew Kelley
7248b4a4e4
std.fs: deprecate base64 APIs
...
100% of std.fs is now deprecated.
2026-01-07 17:33:06 -08:00
Andrew Kelley
c44e12dcd3
std: find a better home for the "preopens" concept
2026-01-07 17:33:06 -08:00
David Rubin
938efe4aab
compiler-rt: fix f80 ceil/floor optimization
...
Our implementation did the classic add-sub rounding trick `(y = x +/- C =+ C - x)`
with `C = 1 / eps(T) = 2^(mantissa - 1)`. This approach only works for values whose
magnitude is below the rounding capacity of the constant. For a 64-bit mantissa
(like f80 has), `C = 2^63` only rounds for `|x| < 2^63`. Before we allowed this to
be ran on `e < bias + 64` aka `|x| < 2^64`. And because it isn't large enough,
we lose a bit to rounding.
For reference, the musl implementation does the same thing, using `mantissa - 1`:
https://git.musl-libc.org/cgit/musl/tree/src/math/ceill.c#n18
where `LDBL_MANT_DIG` is 64 for `long double` on x86.
This commit also combines the floor and ceil implementations into one generic one.
2026-01-08 00:45:52 +01:00
Steven Casper
52e0f78706
byteSwapAllFieldsAligned: use std.mem.Alignment API ( #30724 )
...
Following up on #30571
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30724
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
Co-authored-by: Steven Casper <sebastiancasper3@gmail.com >
Co-committed-by: Steven Casper <sebastiancasper3@gmail.com >
2026-01-08 00:44:08 +01:00
GasInfinity
335c0fcba1
feat(libzigc): add div, ldiv, lldiv and imaxdiv
...
* also remove musl implementation
2026-01-07 21:53:40 +01:00
Andrew Kelley
62d6bbc7dc
Merge pull request 'std.Io: implement entropy (randomness)' ( #30709 ) from random into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30709
2026-01-07 20:04:26 +01:00
Andrew Kelley
006afece53
std.crypto.tls.Client.Options: expose entropy_len
2026-01-07 11:03:37 -08:00
Andrew Kelley
5d0929c40d
std.Io.Threaded.randomSecure: eliminate dead code
2026-01-07 11:03:37 -08:00
Andrew Kelley
5e5b328dac
test-standalone: update cases from posix.getrandom
2026-01-07 11:03:37 -08:00
Andrew Kelley
1ddae8585a
std.Io.Threaded: add procfs fallback for fileHardLink
...
oof what a clunky set of functionality we have here
2026-01-07 11:03:37 -08:00
Andrew Kelley
7e8c7e5696
std.Io: fix AT_SYMLINK_FOLLOW flags
...
hard linking has the backwards default, which uses a different flag
2026-01-07 11:03:37 -08:00
Andrew Kelley
ee574f665c
std.Io.Dir: introduce renamePreserve and use it in File.Atomic.link
...
breaking change: the error for renaming over a non-empty directory now
returns error.DirNotEmpty rather than error.PathAlreadyExists.
2026-01-07 11:03:37 -08:00
Andrew Kelley
8e1850e277
std.Io.Threaded: tweak logic for use_dev_urandom
2026-01-07 11:03:37 -08:00
Andrew Kelley
61cb5e4af9
compiler: fix unit tests
2026-01-07 11:03:37 -08:00
Andrew Kelley
0529fe3411
std.Io.Threaded: fix implementation of getRandomFd
2026-01-07 11:03:37 -08:00
Andrew Kelley
1eddc1737c
std: add test coverage for Io.File.Atomic.link
2026-01-07 11:03:37 -08:00
Andrew Kelley
a136890acc
std.Io.random: clarify doc comments
2026-01-07 11:03:37 -08:00
Andrew Kelley
e23bec700c
build: delete some wrong max_rss values
...
these aren't even checking the correct target, it's checking based on
the host so when cross compiling the numbers don't even make sense.
2026-01-07 11:03:37 -08:00
Andrew Kelley
90f0d7d0da
std.Io.Threaded: implement random seed fallback for WASI
2026-01-07 11:03:37 -08:00
Andrew Kelley
7bd033275e
std.Io.Threaded: implement Windows random seed fallback
2026-01-07 11:03:37 -08:00
Andrew Kelley
1f1381a866
update API usage of std.crypto.random to io.random
2026-01-07 11:03:36 -08:00
Andrew Kelley
81a35a86ea
std.Io: introduce random and randomSecure
...
and use a thread-local CSPRNG for the former.
2026-01-07 11:03:36 -08:00
Andrew Kelley
e3e9c7c33c
std.Build.Step.Compile: take advantage of std lib atomic files
2026-01-07 11:03:36 -08:00
Andrew Kelley
2f639a45b4
std.Io.Threaded: implement windows random with \Device\CNG
2026-01-07 11:03:36 -08:00
Andrew Kelley
42ca9e5d8e
std.Build: remove no longer needed workaround
...
now that definitions of networking addresses are arch-independent
2026-01-07 11:03:36 -08:00
Andrew Kelley
3bc22dbd94
std.Build.Step.Options: exploit Io.File.Atomic
2026-01-07 11:03:36 -08:00
Andrew Kelley
816565dd07
std: move entropy to Io
2026-01-07 11:03:36 -08:00
Alex Rønne Petersen
867501d9d2
ci: bump loongarch64-linux timeouts by 1 hour
...
https://codeberg.org/ziglang/zig/actions/runs/611/jobs/5/attempt/1
2026-01-07 16:04:46 +01:00
Matthew Lugg
cd963ba38d
Io.Threaded: fix bad assertion
...
Resolves: https://codeberg.org/ziglang/zig/issues/30717
2026-01-07 11:27:21 +01:00
Alex Rønne Petersen
28b83e3b02
compiler: recognize and ignore -rpath-link linker option
...
The option should probably still be implemented properly at some point, but LLD
has ignored this for years and nobody seems to mind, so just do the same for
now.
This unblocks using zig cc with CMake on OpenBSD, among other use cases.
ref https://github.com/ziglang/zig/issues/18713
2026-01-07 02:25:10 +01:00
mlugg
1bef876636
Merge pull request 'std.Thread: mask all signals before unmapping stack' ( #30713 ) from detached-thread-exit-signal-race into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30713
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
2026-01-07 01:11:25 +01:00