From 13c6eb0d71b253cc55a667e33dbdd4932f3710f1 Mon Sep 17 00:00:00 2001 From: Mason Remaley Date: Mon, 4 Nov 2024 14:03:36 -0800 Subject: 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`. --- lib/std/std.zig | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/std/std.zig') diff --git a/lib/std/std.zig b/lib/std/std.zig index cc61111746..5c997aebaf 100644 --- a/lib/std/std.zig +++ b/lib/std/std.zig @@ -93,6 +93,7 @@ pub const valgrind = @import("valgrind.zig"); pub const wasm = @import("wasm.zig"); pub const zig = @import("zig.zig"); pub const zip = @import("zip.zig"); +pub const zon = @import("zon.zig"); pub const start = @import("start.zig"); const root = @import("root"); -- cgit v1.2.3