Commit graph

15 commits

Author SHA1 Message Date
Andrew Kelley
a249cc1c7e update std.io.AllocatingWriter to new API 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
1e2aab2f97 std: combine BufferedWriter into Writer 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
e76afef847 std.zip: operate on fs.File.Reader rather than anytype 2025-07-01 16:35:29 -07:00
Jacob Young
fceec91f77 cbe: port to new std.io.BufferedWriter API
when rebasing I gave up on the conflicts of src/link/C.zig and copied
the file from origin/master which was 710632b45c
2025-07-01 16:35:28 -07:00
Andrew Kelley
3b390e4f13 revert most instances of anyerror to match origin/master 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
Andrew Kelley
4ee2534566 std.io.Reader: extract PositionalReader to separate interface 2025-07-01 16:35:26 -07:00
Andrew Kelley
31e0b5c3c7 fix merge conflicts
partially reapply b636d56d6a
2025-07-01 16:35:26 -07:00
Andrew Kelley
5356f3a307 migrate some std lib 2025-07-01 16:35:25 -07:00
Ali Cheraghi
b636d56d6a zon: normalize negative zeroes 2025-03-31 19:07:34 -04:00
Mason Remaley
339b628d4c
Output zig targets as ZON instead of JSON (#22939)
* Adds startTupleField/startStructField, makes pattern in print targets less verbose

* Makes some enums into strings

* Start/finish renamed to begin/end

I feel bad changing this, but I don't know why I named them this way in the first place.
Begin/end is consistent with the json API, and with other APIs in the wild that follow this pattern.
Better to change now than later.
2025-02-21 21:40:57 -05:00
Nico Elbers
0cf6ae290b zon.stringify: Correctly serialize unions with void fields
Closes #22933
2025-02-19 07:21:59 +01:00
Mason Remaley
13c6eb0d71
compiler,std: implement ZON support
This commit allows using ZON (Zig Object Notation) in a few ways.

* `@import` can be used to load ZON at comptime and convert it to a
  normal Zig value. In this case, `@import` must have a result type.
* `std.zon.parse` can be used to parse ZON at runtime, akin to the
  parsing logic in `std.json`.
* `std.zon.stringify` can be used to convert arbitrary data structures
  to ZON at runtime, again akin to `std.json`.
2025-02-03 09:14:37 +00:00