Andrew Kelley
c27ab8b45d
std: update zstd to new API
2025-07-01 16:35:30 -07:00
Andrew Kelley
743326f8e9
std.io.Reader.bufferContents -> buffered
2025-07-01 16:35:30 -07:00
Andrew Kelley
9d18e31fee
std.fs.AtomicFile: don't forget to flush
2025-07-01 16:35:30 -07:00
Andrew Kelley
25a0648176
std: move copy_file_range, fcopyfile impls and usage
2025-07-01 16:35:30 -07:00
Andrew Kelley
7926081ec3
fix std.fs.File.Reader
2025-07-01 16:35:30 -07:00
Andrew Kelley
837f2bfc69
hello world compiling again
2025-07-01 16:35:30 -07:00
Andrew Kelley
af24e722fb
update some stuff to std.io API
2025-07-01 16:35:29 -07:00
Andrew Kelley
52b3275eb2
readable -> reader / writable -> writer
2025-07-01 16:35:29 -07:00
Andrew Kelley
a249cc1c7e
update std.io.AllocatingWriter to new API
2025-07-01 16:35:29 -07:00
Andrew Kelley
ef8d7aa251
std: fix a couple compilation errors
2025-07-01 16:35:29 -07:00
Andrew Kelley
f04bc71ed7
std.io.Reader: update readSliceShort to new API
...
no more readVec
2025-07-01 16:35:29 -07:00
Andrew Kelley
0027cc1b1a
std.io.Writer: implement writableVectorIterator
2025-07-01 16:35:29 -07:00
Andrew Kelley
084e45fd86
std.io.Reader: implement readVec
...
and specify that data.len == 0 means "flush"
2025-07-01 16:35:29 -07:00
Andrew Kelley
b393112674
std: update uses of unbuffered_writer
2025-07-01 16:35:29 -07:00
Andrew Kelley
9d163c7ac3
std.net: update to new IO API
2025-07-01 16:35:29 -07:00
Andrew Kelley
1e2aab2f97
std: combine BufferedWriter into Writer
2025-07-01 16:35:29 -07:00
Andrew Kelley
3c98e2c826
std: combine BufferedReader into Reader
2025-07-01 16:35:29 -07:00
Andrew Kelley
2ed47f1ed8
std: update AtomicFile to new API
2025-07-01 16:35:29 -07:00
Andrew Kelley
ba684a18ca
std: upgrade more API to use File.Reader
2025-07-01 16:35:29 -07:00
Andrew Kelley
2f5574ac08
std: finish renaming RwError to StreamError
2025-07-01 16:35:29 -07:00
Andrew Kelley
21df001001
std: remove fifo
...
bad API
2025-07-01 16:35:29 -07:00
Andrew Kelley
3650cd3e8e
std.fs.File: update for new writeFile API
2025-07-01 16:35:29 -07:00
Andrew Kelley
7b417c6caf
std: improve the discarding writer
...
by making the vtable use File.Reader instead of File and Offset
2025-07-01 16:35:29 -07:00
Andrew Kelley
74c56376ee
std: update http.WebSocket to new API
2025-07-01 16:35:29 -07:00
Andrew Kelley
da303bdaf1
std: fix a bunch of compilation errors
2025-07-01 16:35:29 -07:00
Andrew Kelley
fd4fb10722
std.compress.flate: API reorg and reader/writer updates
...
A lot of this logic disappears in the face of the new buffered reader
and buffered writer interface.
This is passing ast-check only; semantic analysis to be solved next.
2025-07-01 16:35:29 -07:00
Andrew Kelley
06b44a0afa
update git fetching logic to new reader/writer API
...
- flatten std.crypto.hash.Sha1 and give it a writable interface that
optimizes splats
- flatten std.hash.crc and give it a writable interface that optimizes
splats
- remove old writer impls from std.crypto
- add fs.File.Writer.moveToReader
- add fs.File.Writer.seekTo
- add std.io.Reader.Hashed and std.io.Writer.Hashed which are
passthrough streams. Instead of passing through to null writer, use
the writable interface implemented directly on hashers which doesn't
have to account for passing through the data.
- add std.io.BufferedWriter.writeSplatAll
2025-07-01 16:35:29 -07:00
Andrew Kelley
d603121dc3
std.crypto.Certificate.Bundle.macos: rework
...
- use ArrayList strategically to reduce allocations
- use a BufferedReader to avoid unnecessary memcpy of the certs
- use for loops
- skip certs with invalid magic instead of asserting
2025-07-01 16:35:29 -07:00
Jacob Young
01b580e75d
fix compile errors building the compiler
2025-07-01 16:35:29 -07:00
Andrew Kelley
4607770a57
std.debug.Dwarf.expression: partial rework
...
- use labeled continue
- avoid anytype
- avoid dependency on a "seeking" API
- simpler, more optimal VM interpreter loop
- progress decoupling from host machine
- type safety for opcodes. see #15556
2025-07-01 16:35:29 -07:00
Andrew Kelley
4512f27784
introduce std.math.addAny
...
I think this is generally more useful than the existing add function
because it doesn't unnecessarily rely on the types of the operands - the
error only occurs if the final mathematical result cannot be stored in
the desired result type.
2025-07-01 16:35:29 -07:00
Andrew Kelley
803215bb18
delete std.io.MultiWriter
...
instead this use case is better served with passthrough streams. For
instance, hashing writers should support being passed an underlying
writer, and the buffer can go in front of the hasher for optimal code.
2025-07-01 16:35:29 -07:00
Andrew Kelley
110af768bb
remove std.io.BitWriter
2025-07-01 16:35:29 -07:00
Andrew Kelley
e76afef847
std.zip: operate on fs.File.Reader rather than anytype
2025-07-01 16:35:29 -07:00
Andrew Kelley
576702ca40
get autodocs wasm compiling again
...
it's triggering an error.EndOfStream error in the browser tho
2025-07-01 16:35:29 -07:00
Andrew Kelley
af4bb996f0
std.http.Client: fix redirects
2025-07-01 16:35:29 -07:00
Andrew Kelley
b3df9d4bf9
std.http.Client: sendBody flush by default; fix flushing
...
flushing must also flush TLS client if it exists
2025-07-01 16:35:28 -07:00
Andrew Kelley
d0b8392852
std.http fixes
2025-07-01 16:35:28 -07:00
Andrew Kelley
af7721d20f
std.http.BodyWriter: fix end of transfer-encoding chunked
...
Looks like chunked transfers are supposed to always end with a length
zero chunk. This bug exists on master branch as well.
2025-07-01 16:35:28 -07:00
Andrew Kelley
42cc1bd76e
std.io.BufferedReader: implement readVecLimit
2025-07-01 16:35:28 -07:00
Andrew Kelley
b78e375a2d
std.http.Server: flush by default with respond
2025-07-01 16:35:28 -07:00
Andrew Kelley
97c7d6e5b3
std.http: fix parseTrailers (transfer-encoding: chunked)
...
It needs to detect \r\n as end of stream rather than trying to check the
next byte.
2025-07-01 16:35:28 -07:00
Andrew Kelley
2abbcb6d2a
std.http: fix chunked transfer flushing and end-of-stream handling
2025-07-01 16:35:28 -07:00
Andrew Kelley
6fe9c8f036
std.io.BufferedReader: fix peekSentinel
...
it was tossing 2x
2025-07-01 16:35:28 -07:00
Andrew Kelley
d9aa84de28
std.http.Client: fix alignment when freeing memory
2025-07-01 16:35:28 -07:00
Andrew Kelley
847afd0a47
std.http: fix chunked header offset calculation
2025-07-01 16:35:28 -07:00
Andrew Kelley
e4126aa213
std.http.Server: remove the 25 header limit
...
no longer makes sense when there is an output buffer
2025-07-01 16:35:28 -07:00
Andrew Kelley
4716c00366
std.http.Server: don't try to discard nonexistent body
2025-07-01 16:35:28 -07:00
Andrew Kelley
9ed20386bb
std.http.Reader: simplify states
2025-07-01 16:35:28 -07:00
Andrew Kelley
b0d825948a
std.fs.File: fix missing end of stream
2025-07-01 16:35:28 -07:00