pub trait ModuleResolver {
// Required method
fn resolve(&self, spec: &str) -> Option<Resolved>;
}Expand description
A host-provided module loader, consulted at compile time by the const
stage. Maps a spec — whatever a source writes in import "…" — to the
module’s canonical name and source, or None if it cannot be found.
The elly core is no_std, so file I/O lives in the host behind this
callback. A host that confines what a program may load (elly-py’s
PathResolver searches a fixed directory list) enforces it here, and because
the specs are literals in the source, refusing one is a compile-time refusal
rather than a run-time one.