11072 Commits

Author SHA1 Message Date
Andrew Kelley
34d2778239 std.fs.File.Reader.sendFile: fix 32-bit freebsd 2025-07-22 09:39:24 -07:00
Andrew Kelley
76fe518d49 std.fs.File.Reader.sendFile: fix EndOfStream detection 2025-07-21 23:33:19 -07:00
Andrew Kelley
96cbdd145d std.fs.File.Reader: fix sendFile logic
it wasn't accounting for both writer and reader buffering
2025-07-21 20:00:45 -07:00
Andrew Kelley
b35c55e237 std.fs.File.Reader: fix seek position logic 2025-07-21 18:14:21 -07:00
Andrew Kelley
fe10c66d66 std.fs.File.Reader: only fcopyfile if size available 2025-07-21 12:32:37 -07:00
Andrew Kelley
f1576ef14c objcopy: delete most of it
this code is not up to zig project standards

tracked by #24522

oh, and fix not adjusting buffer seek position in std.fs.File.Reader
2025-07-21 12:32:37 -07:00
Andrew Kelley
f2a3ac7c05 std.fs.File: delete writeFileAll and friends
please use File.Writer for these use cases

also breaking API changes to std.fs.AtomicFile
2025-07-21 12:32:37 -07:00
Andrew Kelley
c8c59d7ba5 std.json: delete dead API 2025-07-21 12:32:37 -07:00
Andrew Kelley
9abc3232a8 std.fs.File.Reader: fix missed advance writer positions 2025-07-21 13:08:43 +02:00
Andrew Kelley
f97c91ddb5 std.Thread: don't spin 2025-07-21 05:37:51 +02:00
Andrew Kelley
e4abdf5a13 std.Io.Reader: fix takeStruct/peekStruct packed
closes #24516
2025-07-20 11:23:12 -07:00
Andrew Kelley
8373788c4c
Merge pull request #24488 from ziglang/more
std.zig: finish updating to new I/O API
2025-07-20 11:24:41 +02:00
Marc Tiehuis
4780cc50cf std.Io.Writer: support alignment for {t} specifier 2025-07-20 10:30:17 +02:00
Andrew Kelley
e43617e686
Merge pull request #24505 from ziglang/json
update std.json and std.zon to new I/O API
2025-07-20 09:48:25 +02:00
Alex Rønne Petersen
c58cce7999 std.Build.Step.Run: fix up 681d324c49e7cdc773cc891ea49ed69dd03c23c7
https://github.com/ziglang/zig/pull/24151/files#r2217494741
2025-07-20 07:25:05 +02:00
Andrew Kelley
c40fb96ca3 std.Io.Writer: fix writeSliceSwap
tried to be too clever, wrote bad code
2025-07-19 22:12:37 -07:00
Andrew Kelley
741a66e03c std.zig.llvm.BitcodeReader: fix 32-bit skipBlock 2025-07-19 19:57:37 -07:00
Andrew Kelley
8489bab1f4 std.Io.Writer: add missing writeSliceSwap 2025-07-19 19:57:37 -07:00
Andrew Kelley
bd64bf0e47 std.mem: add byteSwapAllElements 2025-07-19 19:57:37 -07:00
Andrew Kelley
83d1f88ac5 std.debug: add assertAligned 2025-07-19 19:57:37 -07:00
Andrew Kelley
93378e2e7b std.zig: finish updating to new I/O API 2025-07-19 19:57:37 -07:00
Andrew Kelley
0fb7a0a94b std.zon: better namespace for Serializer 2025-07-19 18:27:09 -07:00
Andrew Kelley
c3da98cf5a std.zon: update to new I/O API 2025-07-19 18:27:09 -07:00
Andrew Kelley
c30df072bd std.json: update to new I/O API
also do a little bit of namespace cleanup
2025-07-19 16:05:01 -07:00
Andrew Kelley
a288266f33 std.Io.Reader: remove aggressive assert from fill
with `.fixed("")` you should still be able to do `fill(1)` and have it
return error.EndOfStream.
2025-07-19 16:05:01 -07:00
Andrew Kelley
a0d1682921 std.hash.RapidHash: remove
Its design keeps evolving. See
https://github.com/Nicoshev/rapidhash/releases

It's great to see the design improving, but over time, this will lead to
code rot; versions that aren't widely used but would still have to live
in the standard library forever and be maintained.

Better to be maintained as an external dependency that applications can
opt into. Then, in a few years, if a version proves to be stable and
widely adopted, it could be considered for inclusion in the standard
library.
2025-07-19 11:49:33 -07:00
Alexandre
4e6a04929d Changed u64 to usize to fix #24208 2025-07-19 15:31:44 +02:00
AsmArtisan256
69cf40da60
std.os.uefi.protocol.file: fix getInfo() buffer alignment (#24496)
* std.os.uefi.protocol.file: use @alignCast in getInfo() method to fix #24480

* std.os.uefi.protocol.file: pass alignment responsabilities to caller by redefining the buffer type instead of blindly calling @alignCast
2025-07-18 19:07:05 +00:00
Andrew Kelley
a35688b613
Merge pull request #20069 from LewisGaul/math-tests-simplified
Math tests simplified (exp and log functions) with bugfixes
2025-07-17 18:44:51 +02:00
John Benediktsson
e62e42f0d9
std.io.Writer: remove requirement of a 2-byte buffer for extern unions (#24489)
closes #24486
2025-07-17 16:42:53 +00:00
Andrew Kelley
155ab56cc6 std.zig.readSourceFileToEndAlloc: avoid resizing
+1 on the ensure total capacity to account for the fact that we add a
null byte before returning.

thanks matklad
2025-07-17 09:33:25 -07:00
Andrew Kelley
5784500572 std.Io.Reader: fix readSliceShort with smaller buffer than Reader
closes #24443
2025-07-17 09:26:31 -07:00
Andrew Kelley
86699acbb9 std.Io.Reader: update OneByteReader usage to std.testing.Reader 2025-07-17 09:26:31 -07:00
John Benediktsson
6e86910e19
std.Io: Fix GenericReader.adaptToNewApi; add DeprecatedReader.adaptToNewApi (#24484) 2025-07-17 11:29:22 +00:00
Andrew Kelley
c82403020d
Merge pull request #24472 from ziglang/zig-fmt
zig fmt: update related functionality to new I/O API
2025-07-17 12:06:40 +02:00
kcbanner
9af076615e std.Progress: reset end when failing to flush stderr 2025-07-17 09:05:29 +02:00
Tristan Ross
5ef07302d7 std.Build.Step.ConfigHeader: add the lazy file styled input as a dependency 2025-07-17 05:20:24 +02:00
Lewis Gaul
03dfd2ecc3 Make sure to test the sign of the zero results 2025-07-17 05:04:59 +02:00
Lewis Gaul
7abb170f59 Add tests for math.expm1(), fixing bug in 32-bit function 2025-07-17 05:04:59 +02:00
Lewis Gaul
f34b26231e Add tests for math.log1p() 2025-07-17 05:04:59 +02:00
Andrew Kelley
741569d5a7 std.Ast.Render: fix conflicts with master branch 2025-07-16 17:58:06 -07:00
Andrew Kelley
70f514f1ba std.Io.Reader: fix appendRemaining harder
ensure that it issues a stream call that includes the buffer to detect
the end when needed, but otherwise does not offer Reader buffer to
append directly to the list.
2025-07-16 17:20:03 -07:00
Andrew Kelley
1f93f61958 std.zig.readSourceFileToEndAlloc: add file size heuristic 2025-07-16 17:20:03 -07:00
Andrew Kelley
73cfba4d0d std.Io.Writer: fix writeStruct 2025-07-16 17:20:03 -07:00
Andrew Kelley
e7a639967e std.Io.Reader: fix appendRemaining
it calls readVec which is a higher level function than was expected in
the previous implementation
2025-07-16 17:20:03 -07:00
Andrew Kelley
c4776d66af update compiler 2025-07-16 17:20:02 -07:00
Andrew Kelley
2d5d2ba4f5 std.zig.Render: update it and references 2025-07-16 17:20:02 -07:00
Andrew Kelley
0389b4c7b9 move a file without changing it 2025-07-16 17:20:02 -07:00
Andrew Kelley
6c4a104822 std.zig.Ast: update to new I/O API 2025-07-16 17:20:02 -07:00
Andrew Kelley
1a20b467ea std.zig: update to new I/O API 2025-07-16 17:20:02 -07:00