Package-level declarations

Package for WASI public API.

Types

Link copied to clipboard
data class DateTime(val seconds: Long, val nanoseconds: Int)

A time and date in seconds plus nanoseconds.

Link copied to clipboard

Default monotonic clock, suitable for general-purpose application needs.

Link copied to clipboard

Default wall clock, suitable for general-purpose application needs.

Link copied to clipboard

Default implementation of WasiCli.

Link copied to clipboard
Link copied to clipboard
typealias Descriptor = Int

A descriptor is a reference to a filesystem object, which may be a file, directory, named pipe, special file, or other object on which filesystem calls may be made.

Link copied to clipboard
data class DescriptorFlags(val read: Boolean = false, val write: Boolean = false, val nonBlocking: Boolean = false, val fileIntegritySync: Boolean = false, val dataIntegritySync: Boolean = false, val requestedWriteSync: Boolean = false, val mutateDirectory: Boolean = true)

Descriptor flags.

Link copied to clipboard

The type of a filesystem object referenced by a descriptor.

Link copied to clipboard
data class DirectoryEntry(val inode: INode?, val type: DescriptorType, val name: String)

A directory entry.

Link copied to clipboard

Error codes returned by functions. Not all of these error codes are returned by the functions provided by this API; some are used in higher-level library layers, and others are provided merely for alignment with POSIX.

Link copied to clipboard
Link copied to clipboard
typealias Filesize = ULong

File size or length of a region within a file.

Link copied to clipboard
typealias INode = ULong

Filesystem object serial number that is unique within its file system.

Link copied to clipboard
typealias Instant = Long

A timestamp in nanoseconds.

Link copied to clipboard
data class Modes(val readable: Boolean = false, val writeable: Boolean = false, val executable: Boolean = false)

Permissions mode used by openAt, changeFilePermissionsAt, and similar.

Link copied to clipboard
interface MonotonicClock

A monotonic clock is a clock which has an unspecified initial value, and successive reads of the clock will produce non-decreasing values.

Link copied to clipboard
interface MonotonicTimer

This is a timer that counts down from a given starting time down to zero on a monotonic clock.

Link copied to clipboard
data class OpenFlags(val create: Boolean = false, val directory: Boolean = false, val exclude: Boolean = false, val truncate: Boolean = false)

Open flags used by openAt.

Link copied to clipboard
Link copied to clipboard
data class PathFlags(val symlinkFollow: Boolean)

Flags determining the method of how paths are resolved.

Link copied to clipboard
data class ReadResult(val data: ByteArray, val eof: Boolean)

Result of a read operation.

Link copied to clipboard

Provide a secure random generator implemented via WASI.

Link copied to clipboard

Standard descriptors.

Link copied to clipboard
interface WallClock

A wall clock is a clock which measures the date and time according to some external reference.

Link copied to clipboard

Provides access to WASI APIs.

Link copied to clipboard
interface WasiCli

Provides access to the command line arguments and environment variables.

Link copied to clipboard
class WasiException(val errorCode: Int) : RuntimeException

Thrown when a WASI call fails. TODO Introduce an ErrorCode enum based on the one from wasi-filesystem

Link copied to clipboard
interface WasiFileSystem
Link copied to clipboard
interface WasiPrint

Functions

Link copied to clipboard

Provide a pseudo random generator seeded by a Long value generated via WASI.