Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/sane_fmt/std/wasi.ts>default

Opinionated code formatter for TypeScript and JavaScript
Go to Latest
class default
import { default } from "https://deno.land/x/sane_fmt@0.15.1/std/wasi.ts";

The Context class provides the environment required to run WebAssembly modules compiled to run with the WebAssembly System Interface.

Each context represents a distinct sandboxed environment and must have its command-line arguments, environment variables, and pre-opened directory structure configured explicitly.

Constructors

new
default(options: ContextOptions)

Properties

exports: Record<string, WebAssembly.ImportValue>

Methods

Attempt to initialize instance as a reactor by invoking its _initialize() export.

If instance contains a _start() export, then an exception is thrown.

The instance must also have a WebAssembly.Memory export named "memory" which will be used as the address space, if it does not an error will be thrown.

start(instance: WebAssembly.Instance): null | number | never

Attempt to begin execution of instance as a command by invoking its _start() export.

If the instance does not contain a _start() export, or if the instance contains an _initialize export an error will be thrown.

The instance must also have a WebAssembly.Memory export named "memory" which will be used as the address space, if it does not an error will be thrown.

Constructors

new
default(options: ContextOptions)

Properties

exports: Record<string, WebAssembly.ImportValue>

Methods

Attempt to initialize instance as a reactor by invoking its _initialize() export.

If instance contains a _start() export, then an exception is thrown.

The instance must also have a WebAssembly.Memory export named "memory" which will be used as the address space, if it does not an error will be thrown.

start(instance: WebAssembly.Instance): null | number | never

Attempt to begin execution of instance as a command by invoking its _start() export.

If the instance does not contain a _start() export, or if the instance contains an _initialize export an error will be thrown.

The instance must also have a WebAssembly.Memory export named "memory" which will be used as the address space, if it does not an error will be thrown.