Skip to main content
Go to Latest
interface ContextOptions
import { type ContextOptions } from "https://deno.land/std@0.147.0/wasi/snapshot_preview1.ts";

Properties

optional
args: string[]

An array of strings that the WebAssembly instance will see as command-line arguments.

The first argument is the virtual path to the command itself.

optional
env: { [key: string]: string | undefined; }

An object of string keys mapped to string values that the WebAssembly module will see as its environment.

optional
preopens: { [key: string]: string; }

An object of string keys mapped to string values that the WebAssembly module will see as it's filesystem.

The string keys of are treated as directories within the sandboxed filesystem, the values are the real paths to those directories on the host machine.

optional
exitOnReturn: boolean

Determines if calls to exit from within the WebAssembly module will terminate the proess or return.

optional
stdin: number

The resource descriptor used as standard input in the WebAssembly module.

optional
stdout: number

The resource descriptor used as standard output in the WebAssembly module.

optional
stderr: number

The resource descriptor used as standard error in the WebAssembly module.