Skip to content

Commit 3f45b41

Browse files
committed
fix: zig 0.15.2 io api transition in core
1 parent 5f71b3c commit 3f45b41

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.1.2] - 2026-03-15
8+
## [0.1.3] - 2026-03-15
99

1010
### Fixed
11-
- Homebrew installation paths for MCP server and Wasm binaries.
12-
- Native CLI hanging when run without stdin; added `-h/--help` support.
11+
- Zig 0.15.2 IO API transition: Replaced removed `std.io.getStdOut/getStdIn` with `std.fs.File` equivalents.
12+
- Native build failure on Homebrew environment.
13+
14+
## [0.1.2] - 2026-03-15
1315

1416
## [0.1.1] - 2026-03-15
1517

core/src/main.zig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ pub fn main() !void {
4949
\\OMNI is designed to be used as a filter in your agentic pipelines.
5050
\\
5151
;
52-
try std.io.getStdOut().writer().print("{s}", .{help_text});
52+
try std.fs.File.stdout().deprecatedWriter().print("{s}", .{help_text});
5353
return;
5454
} else if (std.mem.eql(u8, cmd, "-v") or std.mem.eql(u8, cmd, "--version") or std.mem.eql(u8, cmd, "version")) {
55-
try std.io.getStdOut().writer().print("OMNI Core v0.1.0 (Zig)\n", .{});
55+
try std.fs.File.stdout().deprecatedWriter().print("OMNI Core v0.1.0 (Zig)\n", .{});
5656
return;
5757
}
5858
}
@@ -61,22 +61,22 @@ pub fn main() !void {
6161
var stdin_file = std.fs.File.stdin();
6262
const input = stdin_file.readToEndAlloc(allocator, 1024 * 1024 * 10) catch |err| {
6363
if (err == error.EndOfStream) {
64-
try std.io.getStdErr().writer().print("Error: No input provided via stdin.\nUse 'omni --help' for usage.\n", .{});
64+
try std.fs.File.stderr().deprecatedWriter().print("Error: No input provided via stdin.\nUse 'omni --help' for usage.\n", .{});
6565
std.process.exit(1);
6666
}
6767
return err;
6868
};
6969
defer allocator.free(input);
7070

7171
if (input.len == 0) {
72-
try std.io.getStdErr().writer().print("Error: Empty input provided via stdin.\n", .{});
72+
try std.fs.File.stderr().deprecatedWriter().print("Error: Empty input provided via stdin.\n", .{});
7373
std.process.exit(1);
7474
}
7575

7676
const compressed = try compressor.compress(allocator, input, filters.items);
7777
defer allocator.free(compressed);
7878

79-
try std.io.getStdOut().writer().print("{s}\n", .{compressed});
79+
try std.fs.File.stdout().deprecatedWriter().print("{s}\n", .{compressed});
8080
}
8181

8282
test "compressor integration" {

0 commit comments

Comments
 (0)