Andrew Kelley
e9fd9798f4
std.tar.Writer: update reader/writer API usage
2025-07-01 16:35:27 -07:00
Andrew Kelley
24441b184f
std.io.poll: update for BufferedReader
...
only posix is updated so far
also implement `BufferedReader.readVec`
2025-07-01 16:35:27 -07:00
Andrew Kelley
cdd05df532
std.io.BufferedReader: don't use a BufferedWriter field
...
this is way better with readVec and the ability to call
`std.io.Reader.buffered`.
2025-07-01 16:35:27 -07:00
Andrew Kelley
00afaa4b18
std.io.BufferedReader: get rid of the @constCast
...
but it's pushed out to various callsites
2025-07-01 16:35:27 -07:00
Jacob Young
ffb0e283d7
build_runner: fix compile errors
2025-07-01 16:35:27 -07:00
Andrew Kelley
a4fdda6ae0
std.io: redo Reader and Writer yet again
...
explicit error sets ahoy matey
delete some sus APIs from File that need to be reworked
2025-07-01 16:35:27 -07:00
Andrew Kelley
20a784f713
std: start converting networking stuff to new reader/writer
2025-07-01 16:35:27 -07:00
Jacob Young
f3d0fc7a66
backends: port to new std.io.BufferedWriter API
2025-07-01 16:35:26 -07:00
Jacob Young
a21e7ab64f
build_runner: port to new std.io.BufferedWriter API
2025-07-01 16:35:26 -07:00
Andrew Kelley
1164d5ece5
tweak std.io.Writer and followups
...
remove std.fs.Dir.readFileAllocOptions, replace with more flexible API
readFileIntoArrayList
remove std.fs.File.readToEndAllocOptions, replace with more flexible API
readIntoArrayList
update std.fs.File to new reader/writer API
add helper functions to std.io.Reader.Limit
replace std.io.Writer.FileLen with std.io.Reader.Limit
make offset a type rather than u64 so that it can distinguish between
streaming read and positional read
avoid an unnecessary allocation in std.zig.readSourceFileToEndAlloc when
there is a UTF-16 little endian BOM.
2025-07-01 16:35:26 -07:00
Andrew Kelley
383afd19d7
std.io.BufferedWriter: don't use ArrayList for this
...
it's the wrong abstraction and is only a footgun when used this way.
2025-07-01 16:35:26 -07:00
Andrew Kelley
4ee2534566
std.io.Reader: extract PositionalReader to separate interface
2025-07-01 16:35:26 -07:00
Jacob Young
1501734747
io: fix compile errors
2025-07-01 16:35:26 -07:00
Jacob Young
d76c8d0bd2
Dwarf: cleanup and port to new std.io.BufferedReader API
2025-07-01 16:35:26 -07:00
Andrew Kelley
9dc0b4a98f
back to the anyerror!usize vtable
2025-07-01 16:35:26 -07:00
Andrew Kelley
6ac7931bec
std: hacking around with buffered reader / writer semantics
...
I think I'm going to back out these vtable changes in the next commit
2025-07-01 16:35:26 -07:00
Andrew Kelley
890a02c345
std.io: move getStdIn, getStdOut, getStdErr functions to fs.File
...
preparing to rearrange std.io namespace into an interface
2025-07-01 16:35:26 -07:00
Andrew Kelley
57e1fc29d2
reader interface vecs and bufferedwriter arraylist
2025-07-01 16:35:26 -07:00
Andrew Kelley
5aa8573f2b
redo reader
2025-07-01 16:35:26 -07:00