Skip to main content

Module encode

Module encode 

Source
Expand description

Encoder: canonical module → AINF bytes.

The encoder is a pure function of the canonical prepared module, so two logically equal modules always produce byte-identical images. Emission is a single forward pass: every section is laid out in the fixed order declared by crate::layout::Section, each starting on an 8-byte boundary, padded with zero bytes, and the content hash is computed over the finished image with the hash field itself zeroed.

Functions§

encode
Encode a module with default options.
encode_with
Encode a module with explicit options.
hash_image
Compute the Blake3-256 content hash of an image, treating the hash field as zero.