Raised when a module's WASM import section cannot be satisfied at compile time.
Three independent failure modes are reported, and a given raise
populates exactly one of them (the others stay []):
unresolved— function imports the module declares that have no matching entry in the imports map passed toWaEmbedder.compile/3. A list of{module_name, func_name}string pairs.unsupported— non-function imports (memory, table, global, tag), which this embedder does not support. A list of{module_name, name, kind}tuples wherekindis:memory,:table,:global, or:tag.invalid— function imports whose bound target is unusable. A list of{module_name, func_name, reason}tuples wherereasonis::closure_unsupported— the target is a closure capturing environment (bind it to an MFA or&Mod.fun/aritycapture, or use the closure-import mechanism);:unrecognized_target— the target is neither an{Module, :function}tuple nor a function reference;{:arity_mismatch, expected, got}— the target's arity does not match the parameter count of the WASM function type it is bound to.
Summary
Types
@type invalid_reason() :: :closure_unsupported | :unrecognized_target | {:arity_mismatch, non_neg_integer(), term()}