Skip to content
Back to skills

Wasm Wasi Knowledge Patch

ASecurity

WebAssembly / WASI

  • 25 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 5, 2026
developmentjavascriptrustgojavanodeexpressgitapidocumentation

Works with

  • terminal
  • cli
  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill wasm-wasi-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Wasm Wasi Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Wasm Wasi Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-wasm-wasi-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-wasm-wasi-knowledge-patch-nevaberry-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: wasm-wasi-knowledge-patch
description: WebAssembly / WASI
version: "Wasm 3.0 / WASI 0.3.0"
license: MIT
metadata:
  author: Nevaberry
---


# WebAssembly / WASI Knowledge Patch

Load this skill when migrating WASI interfaces, working with native async
components, authoring WIT, selecting compatible toolchains, or checking core
WebAssembly behavior.

| Reference | Topics |
| --- | --- |
| [Core WebAssembly](references/core-webassembly.md) | Core specification, 64-bit memories and tables, exceptions, determinism, text annotations |
| [Initial WASI Async Toolchain](references/toolchains.md) | Runtime and binding requirements, language support, release snapshot, feature adoption, conformance tests |
| [WASI Native Async](references/wasi-async.md) | Call suspension, ownership, forwarding, read/write completion, Go streaming bodies |
| [WASI Interface Migration](references/wasi-interfaces.md) | I/O, sockets, HTTP worlds, clocks, CLI types, Phase 2 proposals |
| [WIT Language and Composition](references/wit-language.md) | Identifiers, comments, NaNs, packages, world inclusion, named instances, maps |

## Replace removed I/O interfaces

WASI 0.3 has no `wasi:io` package.

- Replace `pollable` and `subscribe()` with a future returned by the operation;
  await that future for completion.
- Replace `input-stream` with a returned `stream<u8>`.
- Replace `output-stream` with a `stream<u8>` parameter.

Filesystem reads return a data stream and a terminal result future. You can
read part of the stream, drop it, and still await terminal status. Stdin,
TCP receive, and directory listings also return separate streams and futures.

For writes, pass the data stream into the operation and await the returned
future for the outcome after the host consumes the stream. Stdout, stderr,
filesystem writes, and TCP sends use this pattern.

## Update socket calls and imports

Replace the 0.2 `start-foo` / `finish-foo` pair with one call.
TCP `connect` is an `async func`; `bind` and `listen` are plain functions.

Network access is granted at the world level. Remove the `network` resource
argument from bind, connect, and DNS lookup calls. Update socket imports to
the consolidated `types` and `ip-name-lookup` interfaces.

Consume the `stream<tcp-socket>` returned by TCP `listen` for incoming
connections.

## Update HTTP resources and worlds

`wasi:http` uses `request` and `response` resources, with `stream<u8>` bodies
and a future for trailers. The handler returns the response directly.

- Move from `proxy` to `service` when exporting a handler.
- Use `middleware` when the component also imports a handler.
- Both `service` and `middleware` import `wasi:http/client` for outbound
  requests.

A runtime can wire the `middleware` world's imported `handler` directly to a
downstream component in the same process.

## Rename clocks and share CLI types

Update `wasi:clocks` imports from `wall-clock` to `system-clock` and use
`instant` in place of `datetime`.

Use `wasi:cli/types` for types shared among the CLI interfaces.

## Check runtime and binding compatibility

Existing 0.2 components can keep their 0.2 imports. A 0.3 runtime can
implement those imports with 0.3 primitives at the host boundary.
`wasmtime serve` supports both versions from the same executable by
dispatching per component.

For WASI 0.3:

- Use Wasmtime 46 or later; WASI 0.3 and `component-model-async` are enabled
  by default.
- Use `wkg` 0.15 or later to fetch the packages.
- Generate bindings with `wit-bindgen` 0.46 or later and its `async` feature.
- Use jco's `preview3-shim` for JavaScript hosts. jco's WASI 0.3 shim for
  Node.js is experimental.

Rust builds with `wit-bindgen` 0.58 require nightly: stable Rust bundles an
older `wasm-component-ld` that cannot link that 0.3 output. Rust provides
WASI 0.3 bindings in `wasip3`; most other toolchains still target WASI 0.2.

For WASI 0.3.1 or later, both runtimes and toolchains must support
`implements` and `map<K, V>`. WASI 0.3.1 also adds a requirement to support
`external-id` on plain-named interface imports and exports.

Runtimes and toolchains implementing a WASI version must support ungated
Component Model features and every feature adopted through that version,
including features still unused by the WASI APIs.

## Choose call suspension and transfer handles

A plain `func` returning `future<T>` must return without blocking, leaving
the caller free to await the future later. Use `async func` when the call
itself may need to suspend before returning.

Streams and futures can cross component boundaries as values. An
intermediary can forward a stream without relaying wake-ups.

WIT exposes `stream<T>` and `future<T>` only as owned handles. Passing either
across a component boundary transfers ownership.

See [WASI Native Async](references/wasi-async.md) for read/write signatures
and the Go streaming HTTP body example.

## Express WIT interfaces and collections

Use `implements` to import or export multiple instances of the same
interface under distinct names, such as remote storage and an in-memory
cache using the same key-value interface.

Use `map<K, V>` for an associative collection of keys and values. It replaces
the `list<tuple<K, V>>` pattern for expressing a dictionary in WIT.
WASI WIT interfaces can use both `implements` and maps starting with 0.3.1.

## Author and compose WIT

Identifiers use ASCII letters and digits in words separated by single
hyphens. The first word must start with a letter; later words may start
with a digit. Letters within each word must all have the same case.
Prefix a keyword with `%` to use it as a name.

Ordinary `/* ... */` comments can nest. Both `///` and `/** ... */` attach
documentation to the following item.

A package can span `.wit` files in one directory. One file can declare the
package ID for the entire directory. If several files declare it, their
namespace, name, and version must agree. Interfaces can refer to types in
peer files.

A world can `include` a qualified world path to inherit both imports and
exports from another package.

WIT exposes a single logical NaN for `f32` and `f64`. Use an integer
representation when exact IEEE 754 NaN bits need to survive a component
boundary.

## Check core WebAssembly behavior

Memories and tables can declare `i64` as their address type. On the web,
each 64-bit memory is capped at 16 GiB.

An exception handler is a block whose dispatch list maps tags to branch
labels and can specify a catch-all label. A tag declares the types of the
payload passed to its matching handler.

Engines implementing the deterministic profile use prescribed behavior for
otherwise nondeterministic instruction results, including generated
floating-point NaNs and relaxed SIMD edge cases.

Text annotations are analogous to binary custom sections. Downstream
standards can define their meaning; a Wasm implementation can ignore them.

## Check stable API adoption and runtime conformance

A stable WASI API marked `@since` can depend on a gated Component Model
feature only after the WASI Subgroup adopts it. Use unadopted features in
prerelease versions or proposals that have yet to ship in a stable WASI
release.

Use `wasi-testsuite` to test WASI 0.1 and 0.3 interfaces across runtimes.
Its runner includes adapters for Wasmtime, jco, and WAMR, among others.
See [Initial WASI Async Toolchain](references/toolchains.md) for the adoption
record, test suite, and original Preview 2 WIT snapshot.

Files in this skill

  • SKILL.md9.1 KB
  • coverage.json976 B
  • references/core-webassembly.md2.6 KB
  • references/toolchains.md699 B
  • references/wasi-async.md2.9 KB
  • references/wasi-interfaces.md2.3 KB
  • references/wit-language.md3.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.