Skip to content

docs: add a WASI section to the WebAssembly page#3319

Merged
bartlomieju merged 1 commit into
mainfrom
docs/wasm-wasi-section
Jun 18, 2026
Merged

docs: add a WASI section to the WebAssembly page#3319
bartlomieju merged 1 commit into
mainfrom
docs/wasm-wasi-section

Conversation

@bartlomieju

Copy link
Copy Markdown
Member

The WebAssembly reference page had no mention of WASI, so anyone searching the
docs for "WASI" found nothing. This adds a "WebAssembly System Interface
(WASI)" section covering what WASI is, Deno's support for both generations, and
how to run modules, with working examples.

Everything in the section was built and run while writing it (Deno 2.8.3):

  • WASI Preview 1: compiled a Rust program with
    rustc --target wasm32-wasip1 and ran the resulting .wasm with the
    node:wasi module (the run.ts shown), confirming args and env reach the
    guest.
  • preopens: verified that mapping a directory with preopens lets the
    guest read a file from it, and that Deno requires --allow-read and
    --allow-write for the mapped path (so the permissions note is accurate).
  • WASI Preview 2: compiled with rustc --target wasm32-wasip2 (a component,
    not a plain module) and confirmed both
    deno run -A npm:@bytecodealliance/jco run hello.wasm runs it and
    jco transpile emits an importable ES module.

Note: node:wasi prints an experimental-feature warning, which the section
calls out. The old @std/wasi module is gone from JSR, so it is intentionally
not referenced.

Closes #3203.

@bartlomieju
bartlomieju merged commit 210188d into main Jun 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a WASI section to the WebAssembly page

1 participant