Expand description
Canonical module graph for dependency-ordered compilation.
Replaces AST import inlining with a directed acyclic graph where each module is a node with its own resolved imports and public interface. Modules compile in topological order using the graph for cross-module name resolution.
Structs§
- Exported
Symbol - Metadata for a single exported symbol.
- Graph
Builder - Intermediate builder state used during graph construction.
- Module
Graph - Canonical module graph — the single source of truth for import resolution.
- Module
Id - Opaque module identity — index into the graph’s node array.
- Module
Interface - The public interface of a module — what it exports.
- Module
Node - A single module in the dependency graph.
- Named
Import Symbol - A single symbol from a named import (
from m use { a, b as c }). - Prelude
Import - A prelude import preserving the named/namespace structure from prelude.shape.
- Prelude
Named Symbol - A single symbol imported by the prelude.
Enums§
- Graph
Build Error - Errors that can occur during graph construction.
- Module
Export Visibility - Visibility of a module export.
- Module
Source Kind - How a module’s implementation is provided.
- Module
Source Kind Hint - Classification hint for how a module path should be resolved.
- Resolved
Import - A resolved import — how the importing module accesses a dependency.
Functions§
- build_
module_ graph - Build a complete module graph from a root program.
- collect_
prelude_ import_ paths - Collect prelude import paths by loading
std::core::prelude. - collect_
prelude_ imports - Collect structured prelude imports by loading
std::core::prelude. - resolve_
module_ source_ kind - Classify a module path by probing the module loader’s resolvers.