From 2af424268a2f5f6d44ba0f9271e1b536612499e7 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 2 Oct 2025 15:52:05 -0700 Subject: [PATCH] Zig 0.15: emit bench --- src/synthetic/cli.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/synthetic/cli.zig b/src/synthetic/cli.zig index 36832587c..b32469aab 100644 --- a/src/synthetic/cli.zig +++ b/src/synthetic/cli.zig @@ -90,12 +90,17 @@ fn mainActionImpl( const rand = prng.random(); // Our output always goes to stdout. - const writer = std.io.getStdOut().writer(); + var buffer: [2048]u8 = undefined; + var stdout_writer = std.fs.File.stdout().writer(&buffer); + const writer = &stdout_writer.interface; // Create our implementation const impl = try Impl.create(alloc, opts); defer impl.destroy(alloc); try impl.run(writer, rand); + + // Always flush + try writer.flush(); } test {