Skip to main content

build_graph_and_stdlib_names

Function build_graph_and_stdlib_names 

Source
pub fn build_graph_and_stdlib_names(
    program: &Program,
    loader: &mut ModuleLoader,
    extensions: &[ModuleExports],
) -> Result<(Arc<ModuleGraph>, HashSet<String>, Vec<String>), ShapeError>
Expand description

Build a module graph and compute stdlib names from the prelude modules.

This is the canonical entry point for graph-based compilation. It:

  1. Collects prelude import paths from the module loader
  2. Builds the full module dependency graph
  3. Computes stdlib function names from prelude module interfaces

Returns (graph, stdlib_names, prelude_imports).