From 063074e6ca1675a3d6f1ecdcea2b7d76ef7e10ad Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Tue, 4 Nov 2025 20:55:20 +0100 Subject: BinaryEncoding.md: Add nw_iti custom section --- BinaryEncoding.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'BinaryEncoding.md') diff --git a/BinaryEncoding.md b/BinaryEncoding.md index 2f23e89..135b98f 100644 --- a/BinaryEncoding.md +++ b/BinaryEncoding.md @@ -564,6 +564,24 @@ in-memory. | ----- | ---- | ----------- | | index | uint32* | Type index, as expressed by the [function section](#function-section), encoded as little-endian +### NanoWasm import type index section + +Custom name `name` field: `"nw_iti"` + +The NanoWasm import type index section is a +[custom section](#high-level-structure). It is therefore encoded with id `0` +followed by the name string `"nw_iti"`. It is meant as a +[NanoWasm](#NanoWasm.md) extension to the MVP that allows NanoWasm-compatible +interpreters to quickly retrieve the offset where the +[`external_kind`](#import-entry) (and, optionally, its `type`) members of +an import entry are located, in order to avoid reading unneded information +from the [import section](#import-section) or keep this information +in-memory. + +| Field | Type | Description | +| ----- | ---- | ----------- | +| offset | uint32* | Offset inside the [import section](#import-section), encoded as little-endian | + ### NanoWasm function body offset section Custom section `name` field: `"nw_fbo"` -- cgit v1.2.3