/Knowledge/sources/honojs__hono/llms-full/webassembly-w-wasi-set-up-wit-interface-dependencies--83e7b54a7a47.md
WebAssembly (w/ WASI): Set up WIT interface & dependencies - hono-docs
WebAssembly (w/ WASI): Set up WIT interface & dependencies Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full...
WebAssembly (w/ WASI): Set up WIT interface & dependencies
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#2-set-up-wit-interface-dependencies
Summary
[WebAssembly Interface Types (WIT)][wit] is an Interface Definition Language ("IDL") that governs what functionality a WebAssembly component uses ("imports"), and what it provides ("exports"). Amongst the standardized WIT interfaces, [`w...
Content
[WebAssembly Interface Types (WIT)][wit] is an Interface Definition Language ("IDL") that governs what functionality a WebAssembly component uses ("imports"), and what it provides ("exports").
Amongst the standardized WIT interfaces, [wasi:http][wasi-http] is for dealing with HTTP requests (whether it's receiving them or sending them out), and since we intend to make a web server, our component must declare the use of wasi:http/incoming-handler in its [WIT world][wit-world]:
First, let's set up the component's WIT world in a file called wit/component.wit:
package example:hono;
world component {
export wasi:http/incoming-handler@0.2.6;
}
Put simply, the WIT file above means that our component "provides" the functionality of "receiving"/"handling incoming" HTTP requests.
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#2-set-up-wit-interface-dependencies",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / WebAssembly (w/ WASI) > 2. Set up WIT interface & dependencies (1)",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 446,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "WebAssembly (w/ WASI): Set up WIT interface & dependencies",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}