summaryrefslogtreecommitdiff
path: root/std/wasi/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'std/wasi/README.md')
-rw-r--r--std/wasi/README.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/std/wasi/README.md b/std/wasi/README.md
index 4cbcbbca3..580e7ddd0 100644
--- a/std/wasi/README.md
+++ b/std/wasi/README.md
@@ -55,9 +55,9 @@ This module provides an implementation of the WebAssembly System Interface
## Usage
```typescript
-import WASI from "https://deno.land/std/wasi/snapshot_preview1.ts";
+import Context from "https://deno.land/std/wasi/snapshot_preview1.ts";
-const wasi = new WASI({
+const context = new Context({
args: Deno.args,
env: Deno.env,
});
@@ -65,10 +65,10 @@ const wasi = new WASI({
const binary = await Deno.readFile("path/to/your/module.wasm");
const module = await WebAssembly.compile(binary);
const instance = await WebAssembly.instantiate(module, {
- wasi_snapshot_preview1: wasi.exports,
+ wasi_snapshot_preview1: context.exports,
});
-wasi.memory = instance.exports.memory;
+context.memory = context.exports.memory;
if (module.exports._start) {
instance.exports._start();