Skip to main content

Module materialize

Module materialize 

Source
Expand description

Backend-neutral target-payload admission shared by every concrete driver. Backend-neutral target-payload admission shared by every concrete driver.

Materializing a target payload is two neutral checks bracketing one backend-specific step: admit the payload against the artifact it claims to implement, decode the dialect image, then project the artifact’s resources onto the instance. Only the middle step is target-specific.

Copying the neutral halves per backend is what let them drift. Before this module the same admission checks were written four times, and they had stopped agreeing: two backends rejected a module whose entry point was not main and two accepted it, and one spelled several shared failures with different text than the other three. A payload rejected by one backend was accepted by another for reasons nobody chose.

Structs§

AdmittedModule
One target module whose identity matches the compiler-selected plan.
MaterializerTarget
What the acquired materializer accepts, as declared by its device.
ResourceProjection
Artifact resources sorted by lifetime, as an instance records them.

Functions§

admit
Admit a target payload against the artifact it claims to implement.
compile_error
Build the shared payload-decode failure for backend.
invalid_module
Build the shared “recompile the payload” rejection.
project_resources
Project an artifact’s resources onto the three sets every instance keeps.