abla/runtime/platform/wasi
Generated from source.
Source module; follow its importing module's re-export links.
Source: abla/runtime/platform/wasi.ab
__ablaWasiArgsSizes (extern)
@wasmImport(["wasi_snapshot_preview1", "args_sizes_get"])
trusted noescape extern:"c" fun __ablaWasiArgsSizes(count: i32, size: i32): i32
The WASI Preview 1 command ABI uses wasm32 addresses and u32 sizes. Writes the command argument count and byte size, returning zero or a WASI error.
__ablaWasiArgs (extern)
@wasmImport(["wasi_snapshot_preview1", "args_get"])
trusted noescape extern:"c" fun __ablaWasiArgs(vector: i32, bytes: i32): i32
Writes the argument vector and its strings, returning zero or a WASI error.
__ablaWasiEnvironmentSizes (extern)
@wasmImport(["wasi_snapshot_preview1", "environ_sizes_get"])
trusted noescape extern:"c" fun __ablaWasiEnvironmentSizes(count: i32, size: i32): i32
Writes the environment entry count and byte size, returning zero or a WASI error.
__ablaWasiEnvironment (extern)
@wasmImport(["wasi_snapshot_preview1", "environ_get"])
trusted noescape extern:"c" fun __ablaWasiEnvironment(vector: i32, bytes: i32): i32
Writes the environment vector and its strings, returning zero or a WASI error.
__ablaWasiRead (extern)
@wasmImport(["wasi_snapshot_preview1", "fd_read"])
trusted noescape extern:"c" fun __ablaWasiRead(fd: i32, iov: i32, count: i32, actual: i32): i32
Reads into guest buffers and writes the count, returning zero or a WASI error.
__ablaWasiWrite (extern)
@wasmImport(["wasi_snapshot_preview1", "fd_write"])
trusted noescape extern:"c" fun __ablaWasiWrite(fd: i32, iov: i32, count: i32, actual: i32): i32
Writes guest buffers and stores the count, returning zero or a WASI error.
__ablaWasiExit (extern)
@wasmImport(["wasi_snapshot_preview1", "proc_exit"])
trusted noescape extern:"c" fun __ablaWasiExit(status: i32): void
Ends the command with the given process status.
__ablaWasiClock (extern)
@wasmImport(["wasi_snapshot_preview1", "clock_time_get"])
trusted noescape extern:"c" fun __ablaWasiClock(clock: i32, precision: i64, time: i32): i32
Writes the clock time in nanoseconds, returning zero or a WASI error.
__ablaWasiRandom (extern)
@wasmImport(["wasi_snapshot_preview1", "random_get"])
trusted noescape extern:"c" fun __ablaWasiRandom(data: i32, size: i32): i32
Fills the buffer with random bytes, returning zero or a WASI error.
__ablaWasiPrestat (extern)
@wasmImport(["wasi_snapshot_preview1", "fd_prestat_get"])
trusted noescape extern:"c" fun __ablaWasiPrestat(fd: i32, result: i32): i32
Identifies a preopened descriptor and writes its name length.
__ablaWasiPrestatName (extern)
@wasmImport(["wasi_snapshot_preview1", "fd_prestat_dir_name"])
trusted noescape extern:"c" fun __ablaWasiPrestatName(fd: i32, name: i32, length: i32): i32
Writes the guest name of a preopened descriptor and returns a WASI error on failure.
__ablaWasiPathOpen (extern)
@wasmImport(["wasi_snapshot_preview1", "path_open"])
trusted noescape extern:"c" fun __ablaWasiPathOpen(fd: i32, lookup: i32, path: i32,
length: i32, flags: i32, rights: i64, inherited: i64, fdFlags: i32, result: i32): i32
Opens a path relative to a directory descriptor with explicitly requested rights.
__ablaWasiClose (extern)
@wasmImport(["wasi_snapshot_preview1", "fd_close"])
trusted noescape extern:"c" fun __ablaWasiClose(fd: i32): i32
Closes the given guest descriptor and returns zero or a WASI error.
__ablaWasiDirectoryCreate (extern)
@wasmImport(["wasi_snapshot_preview1", "path_create_directory"])
trusted noescape extern:"c" fun __ablaWasiDirectoryCreate(fd: i32, path: i32, length: i32): i32
Creates a directory relative to a granted directory descriptor.
__ablaWasiPathStat (extern)
@wasmImport(["wasi_snapshot_preview1", "path_filestat_get"])
trusted noescape extern:"c" fun __ablaWasiPathStat(fd: i32, lookup: i32, path: i32,
length: i32, result: i32): i32
Writes metadata for a path within a granted directory descriptor.
__ablaRuntimeWasiArguments (fun)
trusted fun __ablaRuntimeWasiArguments(argc: int): int
Returns the startup argv address, writes argc, and exits on a failed WASI host call.
__ablaRuntimeWasiCStringLength (fun)
trusted fun __ablaRuntimeWasiCStringLength(address: int): int
Returns the byte length of a live NUL-terminated guest string.
__ablaRuntimeWasiSyscall (fun)
trusted fun __ablaRuntimeWasiSyscall(number: int, a0: int, a1: int, a2: int, a3: int): int
Returns the result of a syscall translated to WASI. Unsupported calls return ENOSYS.
Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.