Basic setup for examples

This commit is contained in:
Robin Voetter
2020-07-01 03:07:55 +02:00
parent 023b46751a
commit f0813e99d2
7 changed files with 13754 additions and 91 deletions

View File

@@ -120,13 +120,11 @@ pub fn main() !void {
const file = try std.fs.cwd().openFileZ(std.os.argv[1], .{});
defer file.close();
const spec = try file.reader().readAllAlloc(allocator, std.math.maxInt(usize));
defer allocator.free(spec);
const stdout = std.io.getStdOut().writer();
try vkgen.generate(&prof_alloc.allocator, file.reader(), stdout);
try vkgen.generate(allocator, spec, stdout);
std.debug.print("Total memory usage: {} KiB\n", .{@divTrunc(prof_alloc.max_usage, 1024)});
}
test "main" {
_ = @import("xml.zig");
_ = @import("registry/c-parse.zig");
}