Skip to main content

Module kernel_image

Module kernel_image 

Source
Expand description

Kernel-assisted Image registry.

Certain Cap::Instance values are recognized by their image_hash_chain as kernel-internal (Gas/Quota unit handles, factories, yield markers). The kernel short-circuits their state access — no bytecode dispatch. From userspace they still look like ordinary Cap::Instance values.

This registry lives in javm-cap (not the engine crates) so every layer — the recompiler/interpreter host, the chain genesis, the fuzz harness — agrees on the well-known image_hash for each kernel Image. The hashes are Blake2b256(b"kernel:<name>") placeholders; a later chain-genesis pass can finalize the canonical encoding (the labels are the source of truth).

Enums§

KernelImage
Identifies which kernel-assisted Image a given image_hash_chain refers to.

Constants§

ALL_KERNEL_IMAGES
All kernel Images, for registry iteration.

Functions§

kernel_image_hash
The well-known image_hash for a kernel-assisted Image.
recognize_kernel_image
Look up a kernel-assisted Image by its image_hash_chain. None for a user Image (the common case). Linear scan over ~15 entries — only called at Instance entry / yield routing, not on the hot path.