Module bindings Copy item path Source basic_aux Basic OS information provided to rust libstd basic_return Return info from rust libstd comp_init_info Init information for compartments create_options Options for creating the file. ctor_set dl_phdr_info Information about a loaded dynamic object duration Duration, containing seconds and nanoseconds. endpoint Endpoint addresses, for example, socket address. fd_info Information about a file descriptor. io_ctx Context for I/O operations. io_result Error or value io_vec Io vec, a buffer and a len. link_map loaded_image Information about a loaded program image or library map_result Result map_object call max_align_t minimal_init_info Init information for minimal runtime name_entry object_handle Object handle objid_result Error or value open_info Information for opening a file. open_result Result of open call. option_duration Optional duration. option_exit_code Optional exit code ptr_result Error or value runtime_info Runtime initialization info. socket_address spawn_args Arguments to spawn spawn_result Spawn result. system_info Information about the system tls_desc A TLS desc struct, with a resolver and value tls_index TLS index, module ID and offset. u32_result Error or value u64_result Error or value ACCESS_DENIED ALREADY_BOUND ALREADY_EXISTS ARGUMENT_ERROR BAD_HANDLE BASETYPE_MISMATCH BUSY CREATE_KIND_EITHER Open if it already exists, or create it if it doesn’t. CREATE_KIND_EXISTING Open the file only if it already exists. CREATE_KIND_NEW Open only if it doesn’t exist, and create it. DATA_LOSS DEVICE_ERROR ERROR_CATEGORY_MASK ERROR_CATEGORY_SHIFT ERROR_CODE_MASK ERROR_CODE_SHIFT FD_CMD_DUP Duplicate this descriptor. The arg argument is ignored. The ret argument points to a descriptor. FD_CMD_SYNC Sync the underlying storage of the file descriptor. FD_CMD_TRUNCATE Truncate the underlying storage of the file descriptor. The arg argument points to a u64 length. FD_IS_TERMINAL This file descriptor is a terminal. FD_POS FUTEX_WAKE_ALL Wake all threads instead of a maximum number GATE_DENIED GENERIC_ERROR GET_RANDOM_NON_BLOCKING Do not block when collecting random data INTERNAL INTERRUPTED INVALID_ADDRESS INVALID_ARGUMENT INVALID_FOTE INVALID_GATE INVALID_KEY INVALID_META INVALID_NAME INVALID_PTR INVALID_SCHEME IN_PROGRESS IO_ERROR IO_NONBLOCKING Non-blocking behavior specified. If the operation would block, return io_result with error set to WouldBlock instead. LEN_MUL Multiplier to valid_len. LINK_LOOP MAPPING_FAILED MAP_FLAG_INDIRECT Allow the runtime to provide additional safety properties. MAP_FLAG_NO_NULLPAGE Don’t map a null page for the object. MAP_FLAG_PERSIST Persist changes on flush. MAP_FLAG_R Map with READ permission. MAP_FLAG_W Map with WRITE permission. MAP_FLAG_X Map with EXEC permission. NAME_ENTRY_LEN NAMING_ERROR NON_ATOMIC NOT_CONNECTED NOT_EMPTY NOT_FOUND NOT_MAPPED NOT_SUPPORTED NO_SUCH_OBJECT NO_SUCH_OPERATION OBJECT_ERROR OPEN_FLAG_READ Open the file with read access. OPEN_FLAG_SYMLINK If the file is a symlink, open the link instead of the target. OPEN_FLAG_TAIL Always use the end of the file as the position. OPEN_FLAG_TRUNCATE Truncate the file on open. Requires write access. OPEN_FLAG_WRITE Open the file with write access. OTHER_ERROR OTHER_IO_ERROR OUT_OF_MEMORY OUT_OF_NAMES OUT_OF_RESOURCES REFUSED RESET RESOURCE_ERROR RUNTIME_INIT_COMP Info for compartments RUNTIME_INIT_MIN Minimal runtime info RUNTIME_INIT_MONITOR Info for monitor SECURITY_ERROR SEEK_FAILED SIGNATURE_MISMATCH SUCCESS TIMED_OUT TWZ_RT_EXEID The loaded image ID for the root loaded image (usually the executable) UNAVAILABLE UNCATEGORIZED_ERROR UNREACHABLE WAIT_READ WAIT_WRITE WHENCE_CURRENT Seek offset from current fd position WHENCE_END Seek offset from end of file WHENCE_START Seek offset from start of file WOULD_BLOCK WRONG_NAME_KIND WRONG_TYPE ZERO_MEMORY Zero memory during operation __bool_true_false_are_defined addr_kind_AddrKind_Ipv4 addr_kind_AddrKind_Ipv6 endpoint_kind_Endpoint_Socket endpoint_kind_Endpoint_Unspecified false_ fd_kind_FdKind_Directory Directory fd_kind_FdKind_Regular Regular file fd_kind_FdKind_SymLink Symbolic link monotonicity_NonMonotonic monotonicity_StrongMonotonic monotonicity_WeakMonotonic open_anon_kind_AnonKind_Pipe open_anon_kind_AnonKind_SocketBind open_anon_kind_AnonKind_SocketConnect true_ version NO_DURATION ⚠ __twz_rt_map_two_objects ⚠ twz_rt_abort ⚠ Abort immediately twz_rt_create_rtobj ⚠ Create a new runtime (volatile, tied to this runtime) object. twz_rt_cross_compartment_entry ⚠ Signal the runtime to prep for entry from another compartment twz_rt_dealloc ⚠ Deallocate memory. If ZERO_MEMORY is set, will clear the memory before freeing. twz_rt_exit ⚠ Exit with provided code twz_rt_fd_close ⚠ Close a file descriptor. If the file descriptor is invalid
or already closed, this function does nothing. twz_rt_fd_cmd ⚠ Perform a command on the descriptor. The arguments arg and ret are interpreted according to
the command specified. twz_rt_fd_enumerate_names ⚠ Enumerate sub-names in an fd (e.g. directory entries). The buf and len arguments form a &mut name_entry slice, and the off argument specifies how many names to skip for this read. The return value is the number of entries read, or
0 if at end of list. twz_rt_fd_get_config ⚠ Get a config value for register reg. twz_rt_fd_get_info ⚠ Get information about a descriptor. If this returns true, the fd was valid
and the data pointed to by info is filled with fd_info data. twz_rt_fd_mkns ⚠ Create a new namespace. twz_rt_fd_open ⚠ Open a file. twz_rt_fd_open_anon ⚠ Open a non-named file. The value pointed to by bind_info is dependent on the kind specified in the first
argument. For pipe, bind_info is ignored. For Socket* kinds, bind_info points to a socket_address. twz_rt_fd_pread ⚠ Read from a file. May read less than specified len. twz_rt_fd_pread_from ⚠ Read from a file. May read less than specified len. Fill *ep with information about the source of the I/O (e.g. socket address). twz_rt_fd_preadv ⚠ Do vectored IO read. twz_rt_fd_pwrite ⚠ Write to a file. May write less than specified len. twz_rt_fd_pwrite_to ⚠ Write to a file. May write less than specified len. Send to specified endpoint (e.g. socket address). twz_rt_fd_pwritev ⚠ Do vectored IO write. twz_rt_fd_readlink ⚠ Read symlink. twz_rt_fd_remove ⚠ Remove a name in the namespace. twz_rt_fd_seek ⚠ Seek to a specified point in the file. twz_rt_fd_set_config ⚠ Set a config value for register reg. Setting a register may have side effects. twz_rt_fd_symlink ⚠ Create a new symlink. twz_rt_fd_waitpoint ⚠ Get a word and value to wait on for determining if reads or writes are available. twz_rt_futex_wait ⚠ If *ptr == expected, wait until signal, optionally timing out. twz_rt_futex_wake ⚠ Wake up up to max threads waiting on ptr. If max is set to FUTEX_WAKE_ALL, wake all threads. twz_rt_get_loaded_image ⚠ Get a loaded image from its ID. All IDs for loaded image are sequential, starting from TWZ_RT_EXEID.
On success, fill out data pointed to by the li argument and return true. twz_rt_get_monotonic_time ⚠ Get time from the monotonic clock twz_rt_get_object_handle ⚠ Given a pointer, find the associated object. The returned pointer and the passed pointer p
are guaranteed to be in the same object, allowing pointer arithmetic. twz_rt_get_random ⚠ Collect up to len bytes of randomness, filling buf. Returns the number of bytes
of random data actually collected. twz_rt_get_sysinfo ⚠ Get system information twz_rt_get_system_time ⚠ Get time from the system clock twz_rt_insert_fot ⚠ Insert the given entry into the FOT, or return the existing entry if it already exists in this object’s FOT.
Returns -1 on failure. twz_rt_iter_phdr ⚠ twz_rt_join_thread ⚠ Wait for a thread to exit, optionally timing out. twz_rt_locate_object_start ⚠ Given a pointer, find the start of the associated object. The returned pointer and the passed pointer p
are guaranteed to be in the same object, allowing pointer arithmetic. twz_rt_malloc ⚠ Allocate memory, zeroing it first if the flag is set. twz_rt_map_object ⚠ Map an object with a given ID and flags. twz_rt_post_main_hook ⚠ twz_rt_pre_main_hook ⚠ twz_rt_realloc ⚠ Reallocate memory. If ZERO_MEMORY is set, will zero new memory before returning and zero to-be-freed memory before freeing. twz_rt_release_handle ⚠ Release an object handle. After calling this, the handle may not be used. twz_rt_resolve_fot ⚠ Resolve an FOT entry, returning an object handle for the target object with at least valid_len bytes of
addressable memory. twz_rt_resolve_fot_local ⚠ Does the same as twz_rt_resolve_fot but optimizes for local pointers and avoids cloning handles if possible. Returns null on failure
with no error code. Callers should try the twz_rt_resolve_fot function if this one fails. twz_rt_runtime_entry ⚠ twz_rt_set_name ⚠ Set the name of the calling thread. twz_rt_set_upcall_handler ⚠ Set the handler for an upcall from kernel twz_rt_sleep ⚠ Sleep the calling thread for specified duration. twz_rt_spawn_thread ⚠ Sawn a thread. On success, that thread starts executing concurrently with this function’s return. twz_rt_tls_desc_resolve ⚠ Resolver for tls_desc twz_rt_tls_get_addr ⚠ Resolve the TLS index and get back the TLS data pointer. twz_rt_update_handle ⚠ Update an object handle. twz_rt_yield_now ⚠ Yield the thread now. __uint128_t Object ID addr_kind alloc_flags Allocation flags descriptor An open descriptor for a runtime file handle. endpoint_kind exit_code Exit code type fd_cmd Commands for descriptors. fd_flags Flags a descriptor can have. fd_kind Kinds of underlying fd objects futex_word Futex type, based on linux futex. get_random_flags Flags to get_random int_fast8_t int_fast16_t int_fast32_t int_fast64_t int_least8_t int_least16_t int_least32_t int_least64_t intmax_t io_flags Flags for IO operations loaded_image_id An ID for a loaded program image (or library) map_flags Mapping flags monotonicity Supported monotonicity levels objid Object ID open_anon_kind optional_offset Optional offset. If value is FD_POS, use the file descriptor position. thread_id Runtime-internal ID of a thread twz_error twz_error_category twz_error_code uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t uint_least8_t uint_least16_t uint_least32_t uint_least64_t uintmax_t wait_kind wchar_t whence Type of whence values for seek. endpoint_addrs init_info_ptrs Possible init info types socket_address_addrs