authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-08-24 02:44:03 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-08-24 02:44:03 -07:00
logfbd112e48048289ad2e1aed1da69328f0ffe1ecd
treee582942c91e03c9642c0ea1d5b4b1bd85943a953
parented2317992dacb4eb7354192e2e8900b95e44328f

start using nio


3 files changed, 5 insertions(+), 2 deletions(-)

intrusive_parser.zig+3-2
......@@ -1,9 +1,10 @@
11const std = @import("std");
22const string = []const u8;
33const extras = @import("extras");
4const nio = @import("nio");
45
56pub const Parser = struct {
6 any: std.io.AnyReader,
7 any: nio.AnyReadable,
78 allocator: std.mem.Allocator,
89 temp: std.ArrayListUnmanaged(u8) = .{},
910 idx: usize = 0,
......@@ -14,7 +15,7 @@ pub const Parser = struct {
1415 strings_map: std.StringArrayHashMapUnmanaged(usize) = .{},
1516 string_tag: u8,
1617
17 pub fn init(allocator: std.mem.Allocator, any: std.io.AnyReader, string_tag: u8) Parser {
18 pub fn init(allocator: std.mem.Allocator, any: nio.AnyReadable, string_tag: u8) Parser {
1819 return .{
1920 .any = any,
2021 .allocator = allocator,
licenses.txt+1
......@@ -1,6 +1,7 @@
11MPL-2.0:
22= https://spdx.org/licenses/MPL-2.0
33- This
4- git https://github.com/nektro/zig-nio
45
56MIT:
67= https://spdx.org/licenses/MIT
zigmod.yml+1
......@@ -5,3 +5,4 @@ license: MPL-2.0
55description: Core plumbing to make text or binary document parsers with Data Oriented Design
66dependencies:
77 - src: git https://github.com/nektro/zig-extras
8 - src: git https://github.com/nektro/zig-nio