diff --git a/README.md b/README.md index 86b63a8..3f116bb 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # Getting Started ## Requirements -- Zig 0.16.0-dev.2368: [Linux](https://ziglang.org/builds/zig-x86_64-linux-0.16.0-dev.2368+380ea6fb5.tar.xz)/[Windows](https://ziglang.org/builds/zig-x86_64-windows-0.16.0-dev.2368+380ea6fb5.zip) +- Zig 0.16.0-dev.2459: [Linux](https://ziglang.org/builds/zig-x86_64-linux-0.16.0-dev.2459+37d14a4f3.tar.xz)/[Windows](https://ziglang.org/builds/zig-x86_64-windows-0.16.0-dev.2459+37d14a4f3.zip) #### For additional help, you can join our [discord server](https://discord.xeondev.com) diff --git a/build.zig.zon b/build.zig.zon index dafe942..f2574f7 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,7 +1,7 @@ .{ .name = .LR_S, .version = "0.1.0", - .minimum_zig_version = "0.16.0-dev.2368+380ea6fb5", + .minimum_zig_version = "0.16.0-dev.2459+37d14a4f3", .paths = .{""}, .fingerprint = 0x50ff8392fab61337, } diff --git a/common/src/io/poll.zig b/common/src/io/poll.zig index 92c6528..500af64 100644 --- a/common/src/io/poll.zig +++ b/common/src/io/poll.zig @@ -1721,16 +1721,6 @@ pub fn Poll(comptime io_options: IoOptions) type { return tio.vtable.dirCreateDirPathOpen(tio.userdata, dir, sub_path, perm, options); } - fn fileWriteStreaming(userdata: ?*anyopaque, file: Io.File, header: []const u8, data: []const []const u8, splat: usize) Io.File.Writer.Error!usize { - const p: *ThisPoll = @ptrCast(@alignCast(userdata)); - try checkCancel(p); - - var t: Io.Threaded = .init_single_threaded; - const tio = t.io(); - - return tio.vtable.fileWriteStreaming(tio.userdata, file, header, data, splat); - } - fn fileWritePositional(userdata: ?*anyopaque, file: Io.File, header: []const u8, data: []const []const u8, splat: usize, offset: u64) Io.File.WritePositionalError!usize { const p: *ThisPoll = @ptrCast(@alignCast(userdata)); try checkCancel(p); @@ -1791,14 +1781,16 @@ pub fn Poll(comptime io_options: IoOptions) type { return tio.vtable.fileReadPositional(tio.userdata, file, data, offset); } - fn fileReadStreaming(userdata: ?*anyopaque, file: Io.File, data: []const []u8) Io.File.Reader.Error!usize { + fn operate(userdata: ?*anyopaque, operation: Io.Operation) Io.Cancelable!Io.Operation.Result { + // TODO: implement network operations once they're migrated to this API. + const p: *ThisPoll = @ptrCast(@alignCast(userdata)); try checkCancel(p); var t: Io.Threaded = .init_single_threaded; const tio = t.io(); - return tio.vtable.fileReadStreaming(tio.userdata, file, data); + return tio.vtable.operate(tio.userdata, operation); } fn socketClose(socket: posix.socket_t) void { diff --git a/envrc b/envrc index c314a74..f6356d5 100755 --- a/envrc +++ b/envrc @@ -1,7 +1,7 @@ #!/bin/sh # DEPENDS: curl, tar, xz, realpath -ZIG_VERSION="0.16.0-dev.2368+380ea6fb5" +ZIG_VERSION="0.16.0-dev.2459+37d14a4f3" ZIG_PLATFORM="x86_64-linux" ZIG_DIST="zig-${ZIG_PLATFORM}-${ZIG_VERSION}" ZIG_DIR="./.direnv/${ZIG_DIST}/"