19 Commits

Author SHA1 Message Date
Andrew Kelley
f333267782 update std.http.Server to new API
and rename std.io.BufferedWriter.writableSlice to writableSliceGreedy

and make writableSlice and writableArray advance the buffer end position

introduce std.io.BufferedWriter.writeSplatLimit but it's unimplemented
2025-07-01 16:35:27 -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
Micah Switzer
b8ac740a1b Fix zig std regression FTBFS
Regressed in 9176408
2025-06-30 18:06:14 +02:00
Linus Groh
8588964972 Replace deprecated default initializations with decl literals 2024-09-12 16:01:23 +01:00
Andrew Kelley
9848318725 fix autodocs regression FTBFS
regressed in dffc8c44f9a01aa05ea364ffdc71509d15bc2601 since there is no
test coverage for the `zig std` command yet.

closes #21180
2024-08-23 19:23:38 -07:00
Igor Anić
72bcc3b7a5
std.tar: add writer (#19603)
Simplifies code in docs creation where we used `std.tar.output.Header`.
Writer uses that Header internally and provides higher level interface.
Updates checksum on write, handles long file names, allows setting mtime and file permission mode. Provides handy interface for passing `Dir.WalkerEntry`.
2024-08-15 22:05:53 -07:00
Andrew Kelley
107b272766 fuzzer: share zig to html rendering with autodocs 2024-08-07 00:48:32 -07:00
Andrew Kelley
f47824f24d std: restructure child process namespace 2024-05-26 09:31:55 -07:00
Andrew Kelley
0286970b19 std autodocs server: don't trim all URLs
This is a partial revert of 6635360dbdbd6793b741648d51d25f12550e01db.
2024-05-22 07:13:08 -07:00
Jiacai Liu
6635360dbd
std-docs: use open for macOS. 2024-05-21 23:21:17 +03:00
Josh Wolfe
9ab6d91067
zig std accepts --port and --no-open-browser (#19559) 2024-04-06 15:18:43 -04:00
Ian Johnson
3fb6bb1449 std-docs: include builtin module in sources.tar
Now that `-femit-docs` includes all modules, including the builtin
module, in the generated source tarball, it makes sense to apply the
same logic to the std-docs server. std-docs constructs its own tarball,
so a different approach is needed to achieve the same end result.
2024-03-28 00:30:42 -04:00
Andrew Kelley
ffd53a459e -femit-docs: creating sources.tar
It's always a good day when you get to use File.writeFileAll 😎
2024-03-10 17:51:07 -07:00
Andrew Kelley
ed8ee3ddd3 slightly better error name when wasm compilation fails 2024-03-10 17:51:06 -07:00
Andrew Kelley
6b84c8e04c zig std: implement tar format 2024-03-10 17:51:06 -07:00
Andrew Kelley
c427685a13 zig std: implement sources.tar endpoint
except for the tar format being correct
2024-03-10 17:51:06 -07:00
Andrew Kelley
574b33e65a zig std: use threads for the http server 2024-03-10 17:51:06 -07:00
Andrew Kelley
c7c7ad1b78 zig std: implement serving the wasm binary 2024-03-10 17:51:06 -07:00
Andrew Kelley
34faf9d12e add skeleton of zig std command impl 2024-03-10 17:51:06 -07:00