Skip to main content

Module module_graph

Module module_graph 

Source
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§

ExportedSymbol
Metadata for a single exported symbol.
GraphBuilder
Intermediate builder state used during graph construction.
ModuleGraph
Canonical module graph — the single source of truth for import resolution.
ModuleId
Opaque module identity — index into the graph’s node array.
ModuleInterface
The public interface of a module — what it exports.
ModuleNode
A single module in the dependency graph.
NamedImportSymbol
A single symbol from a named import (from m use { a, b as c }).
PreludeImport
A prelude import preserving the named/namespace structure from prelude.shape.
PreludeNamedSymbol
A single symbol imported by the prelude.

Enums§

GraphBuildError
Errors that can occur during graph construction.
ModuleExportVisibility
Visibility of a module export.
ModuleSourceKind
How a module’s implementation is provided.
ModuleSourceKindHint
Classification hint for how a module path should be resolved.
ResolvedImport
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.