const std = @import("std"); const tmz = @import("tmz"); pub fn main() !void { var gpa = std.heap.GeneralPurposeAllocator(.{}){}; const allocator = gpa.allocator(); defer _ = gpa.deinit(); const parsed_map = try tmz.parseMap(allocator, @embedFile("map.tmj")); defer parsed_map.deinit(); const stdout_file = std.io.getStdOut().writer(); var bw = std.io.bufferedWriter(stdout_file); const stdout = bw.writer(); try stdout.print("Map: {any}\n", .{parsed_map.value}); try bw.flush(); // don't forget to flush! }