Module dev_wasi.erl¶
A virtual filesystem device.
Description¶
Implements a file-system-as-map structure, which is traversible externally. Each file is a binary and each directory is an AO-Core message. Additionally, this module adds a series of WASI-preview-1 compatible functions for accessing the filesystem as imported functions by WASM modules.
Function Index¶
basic_aos_exec_test/0* | |
clock_time_get/3 | |
compute/1 | |
fd_read/3 | Read from a file using the WASI-p1 standard interface. |
fd_read/5* | |
fd_write/3 | WASM stdlib implementation of fd_write , using the WASI-p1 standard
interface. |
fd_write/5* | |
gen_test_aos_msg/1* | |
gen_test_env/0* | |
generate_wasi_stack/3* | |
init/0* | |
init/3 | On-boot, initialize the virtual file system with: - Empty stdio files - WASI-preview-1 compatible functions for accessing the filesystem - File descriptors for those files. |
parse_iovec/2* | Parse an iovec in WASI-preview-1 format. |
path_open/3 | Adds a file descriptor to the state message. |
stdout/1 | Return the stdout buffer from a state message. |
vfs_is_serializable_test/0* | |
wasi_stack_is_serializable_test/0* |
Function Details¶
basic_aos_exec_test/0 *¶
basic_aos_exec_test() -> any()
clock_time_get/3¶
clock_time_get(Msg1, Msg2, Opts) -> any()
compute/1¶
compute(Msg1) -> any()
fd_read/3¶
fd_read(Msg1, Msg2, Opts) -> any()
Read from a file using the WASI-p1 standard interface.
fd_read/5 *¶
fd_read(S, Instance, X3, BytesRead, Opts) -> any()
fd_write/3¶
fd_write(Msg1, Msg2, Opts) -> any()
WASM stdlib implementation of fd_write
, using the WASI-p1 standard
interface.
fd_write/5 *¶
fd_write(S, Instance, X3, BytesWritten, Opts) -> any()
gen_test_aos_msg/1 *¶
gen_test_aos_msg(Command) -> any()
gen_test_env/0 *¶
gen_test_env() -> any()
generate_wasi_stack/3 *¶
generate_wasi_stack(File, Func, Params) -> any()
init/0 *¶
init() -> any()
init/3¶
init(M1, M2, Opts) -> any()
On-boot, initialize the virtual file system with: - Empty stdio files - WASI-preview-1 compatible functions for accessing the filesystem - File descriptors for those files.
parse_iovec/2 *¶
parse_iovec(Instance, Ptr) -> any()
Parse an iovec in WASI-preview-1 format.
path_open/3¶
path_open(Msg1, Msg2, Opts) -> any()
Adds a file descriptor to the state message. path_open(M, Instance, [FDPtr, LookupFlag, PathPtr|_]) ->
stdout/1¶
stdout(M) -> any()
Return the stdout buffer from a state message.
vfs_is_serializable_test/0 *¶
vfs_is_serializable_test() -> any()
wasi_stack_is_serializable_test/0 *¶
wasi_stack_is_serializable_test() -> any()