Interface: WASIOptions
Properties
args?
optionalargs?:string[]
Command line arguments.
env?
optionalenv?:Record<string,string>
Environment variables as key-value pairs.
preopens?
optionalpreopens?:Record<string,string>
Pre-opened directories mapping guest paths to host paths.
returnOnExit?
optionalreturnOnExit?:boolean
By default, when the WASI application calls proc_exit(),
WASI.start returns the exit code rather than terminating the
process. Set to false to make the process exit with that code
instead.
Default
true
stderr?
optionalstderr?:number
The file descriptor used as standard error in the WASI application. On Windows this must be a regular file or standard-stream fd; sockets and pipes are not supported.
Default
2
stdin?
optionalstdin?:number
The file descriptor used as standard input in the WASI application. On Windows this must be a regular file or standard-stream fd; sockets and pipes are not supported.
Default
0
stdout?
optionalstdout?:number
The file descriptor used as standard output in the WASI application. On Windows this must be a regular file or standard-stream fd; sockets and pipes are not supported.
Default
1
version
version:
WASIVersion
Required. The WASI version to use.