Expand description
The load module (.iwm) of docs/load-module.md: its container, encoding rules and codec.
Re-exports§
Modules§
- codec
- The codec traits, the writer and reader they use, the §4.1 and §4.4 impls, and the §4.6 macros.
- crc
- CRC-32: the IEEE polynomial, reflected, initial and final XOR
0xFFFFFFFF(load-module.md §3.3). - leb
- Unsigned LEB128 and zigzag (load-module.md §4.1), with only the canonical form accepted.
Structs§
- Directory
Entry - A program’s line in the
DIRECTORYsection (load-module.md §6). - Loaded
Module - The programs of a module, in ordinal order, with their directory.
- Module
- A module whose header and table are checked; a section’s checksum is checked when it is read.
- Module
Writer - Builds section bodies in id order;
finishputs the string table first and adds the checksums. - Section
- A section this version knows (load-module.md §3.4). Every one is required.
- Section
Entry - String
Table - The one table of strings a module’s sections refer to by index (load-module.md §4.2).
- Version
Enums§
Constants§
- EXTENSIONS
- The first id of the extension sections, which are always written optional.
- MAGIC
- OPTIONAL
- Flag bit 0 of a section entry: a reader that does not know the section skips it.
Functions§
- read
- Reads and checks a module; the bytes of every section are checksummed.
- write
- A module of
programs, each a top-level program in the directory. Same input, same bytes. - write_
with - A module with the caller’s directory, refused (as the reader would) if it or a program is invalid.