Last updated: 2026-11-17

Vulkan Runtime

Host Io

All API Sections

Process I/O shared by host orchestration and the standalone tools.

Production entrypoints install the process's standard I/O implementation; unit tests use the test runner's implementation.

22 exports 14 methods src/host_io.zig

22 exports shown

variable

io

#
pub var io: std.Io = if (builtin.is_test) std.testing.io else fallback.io()

No public doc comment yet.

src/host_io.zig:8

function

init

#
pub fn init(process: std.process.Init) void

No public doc comment yet.

src/host_io.zig:11

function

argsAlloc

#
pub fn argsAlloc(allocator: std.mem.Allocator) ![][:0]u8

No public doc comment yet.

src/host_io.zig:16

function

argsFree

#
pub fn argsFree(allocator: std.mem.Allocator, args: []const [:0]u8) void

No public doc comment yet.

src/host_io.zig:32

function

argsWithAllocator

#
pub fn argsWithAllocator(allocator: std.mem.Allocator) !std.process.Args.Iterator

No public doc comment yet.

src/host_io.zig:37

function

getenv

#
pub fn getenv(name: []const u8) ?[:0]const u8

Read the live process environment, including changes made after startup.

src/host_io.zig:42

function

repeatText

#
pub fn repeatText(comptime text: []const u8, comptime count: usize) [text.len * count]u8

No public doc comment yet.

src/host_io.zig:51

function

timestamp

#
pub fn timestamp() i64

No public doc comment yet.

src/host_io.zig:57

function

getEnvVarOwned

#
pub fn getEnvVarOwned(allocator: std.mem.Allocator, name: []const u8) ![]u8

No public doc comment yet.

src/host_io.zig:61

struct

Mutex

#
pub const Mutex = struct

Memory Layout

Size: 4 bytes (alignment: 4)

Offset Size Align Field Type
0 4 4 value Io.Mutex

No public doc comment yet.

src/host_io.zig:66

Methods

3

struct

Condition

#
pub const Condition = struct

Memory Layout

Size: 8 bytes (alignment: 4)

Offset Size Align Field Type
0 8 4 value Io.Condition

No public doc comment yet.

src/host_io.zig:82

Methods

3

method

Condition.wait

#
pub fn wait(self: *Condition, mutex: *Mutex) void

No public doc comment yet.

src/host_io.zig:85

method

Condition.signal

#
pub fn signal(self: *Condition) void

No public doc comment yet.

src/host_io.zig:89

method

Condition.broadcast

#
pub fn broadcast(self: *Condition) void

No public doc comment yet.

src/host_io.zig:93

struct

Pool

#
pub const Pool = struct

Memory Layout

Size: 872 bytes (alignment: 8)

Offset Size Align Field Type
0 864 8 backend Io.Threaded
864 8 8 n_jobs usize

Bounded CPU executor for the reference runtime's optional general pool.

The dedicated allocation-free decode pool remains its preferred hot path.

src/host_io.zig:100

Methods

4

method

Pool.init

#
pub fn init(self: *Pool, options: Options) !void

No public doc comment yet.

src/host_io.zig:109

method

Pool.spawnWg

#
pub fn spawnWg(self: *Pool, group: *std.Io.Group, comptime function: anytype, args: anytype) void

No public doc comment yet.

src/host_io.zig:124

method

Pool.waitAndWork

#
pub fn waitAndWork(self: *Pool, group: *std.Io.Group) void

No public doc comment yet.

src/host_io.zig:128

function

readToEndAlloc

#
pub fn readToEndAlloc(file: std.Io.File, allocator: std.mem.Allocator, limit: usize) ![]u8

No public doc comment yet.

src/host_io.zig:133

function

readAll

#
pub fn readAll(file: std.Io.File, buffer: []u8) !usize

No public doc comment yet.

src/host_io.zig:138

function

read

#
pub fn read(file: std.Io.File, buffer: []u8) !usize

No public doc comment yet.

src/host_io.zig:143

function

writeSocketAll

#
pub fn writeSocketAll(stream: std.Io.net.Stream, bytes: []const u8) !void

No public doc comment yet.

src/host_io.zig:151

function

writeSocketVecAll

#
pub fn writeSocketVecAll(stream: std.Io.net.Stream, buffers: [][]const u8) !void

Send a frame without copying its payload or issuing one write per fragment.

The writer handles short writes and restores the supplied slice descriptors.

src/host_io.zig:158

function

readSocket

#
pub fn readSocket(stream: std.Io.net.Stream, bytes: []u8) !usize

No public doc comment yet.

src/host_io.zig:163

function

nanoTimestamp

#
pub fn nanoTimestamp() i128

No public doc comment yet.

src/host_io.zig:172

function

milliTimestamp

#
pub fn milliTimestamp() i64

No public doc comment yet.

src/host_io.zig:176

function

sleep

#
pub fn sleep(nanoseconds: u64) void

No public doc comment yet.

src/host_io.zig:180

struct

Timer

#
pub const Timer = struct

Memory Layout

Size: 16 bytes (alignment: 16)

Offset Size Align Field Type
0 16 16 started Io.Timestamp

No public doc comment yet.

src/host_io.zig:184

Methods

4