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
Andrew Kelley
5ac895c820
std.crypto.tls.Client: give all cleartext in read
2025-07-01 16:35:28 -07:00
Andrew Kelley
bb7af21d6f
std.crypto.tls.Client: update to new reader/writer API
2025-07-01 16:35:28 -07:00
Andrew Kelley
e326d7e8ec
fix build runner compilation
2025-07-01 16:35:28 -07:00
Andrew Kelley
a091ccb217
std.compress.zstd.Decompress: cap input buffer required size
2025-07-01 16:35:28 -07:00
Andrew Kelley
b3da216f1b
std.io.BufferedReader: add readRemaining
2025-07-01 16:35:28 -07:00
Andrew Kelley
cbe5920975
std.io.Reader: rename readAll to readRemaining
2025-07-01 16:35:28 -07:00
Andrew Kelley
0d29c78af5
std.compress.zstd: tests passing
2025-07-01 16:35:28 -07:00
Andrew Kelley
990031444d
std.io.Reader: add assertion to verify counts
2025-07-01 16:35:28 -07:00
Andrew Kelley
01973a8a16
std.io.BufferedReader: don't use @memmove yet
...
so I can use the x86 backend
2025-07-01 16:35:28 -07:00
Andrew Kelley
f32fc8a848
std.io.Reader.readRemainingArrayList: add minimum_buffer_size
...
since some reader implementations may require it
2025-07-01 16:35:28 -07:00
Andrew Kelley
2dbf05af0a
std.compress.zstd: better error code for oversize literals
2025-07-01 16:35:28 -07:00
Andrew Kelley
2ff5ea2231
std.compress.zstd: fix raw/rle blocks not doing frame accounting
2025-07-01 16:35:28 -07:00
Andrew Kelley
439117d0d7
std.compress.zstd.Decompress: avoid @errorCast
...
better error return traces and type safety
2025-07-01 16:35:28 -07:00
Andrew Kelley
e05af2da13
std.compress.zstd: it's compiling
2025-07-01 16:35:28 -07:00
Andrew Kelley
685d55c1a4
std.compress.zstd: rewrite
...
WIP - passing AstGen but not yet Sema
2025-07-01 16:35:28 -07:00
Andrew Kelley
689a70663a
remove heap allocation from zstd
2025-07-01 16:35:28 -07:00
Andrew Kelley
25ac70f973
std: WIP update more to new reader/writer
...
delete some bad readers/writers
add limited reader
update TLS
about to do something drastic to compress
2025-07-01 16:35:28 -07:00
Andrew Kelley
c7040171fb
std.http: mostly finish the rewrite
2025-07-01 16:35:28 -07:00
Andrew Kelley
aef0434c01
formatted printing: fix handling of nested format functions
2025-07-01 16:35:28 -07:00
Andrew Kelley
d8cea03245
std.http: more update
2025-07-01 16:35:28 -07:00
Andrew Kelley
ab3a947bef
get build runner compiling again
2025-07-01 16:35:28 -07:00