maat_module
Module system and multi-file compilation for the Maat programming language.
Role
maat_module resolves mod declarations into a directed acyclic dependency graph before compilation begins. Each source file is parsed independently, cycle detection is performed via DFS with gray/black coloring, and the resulting topological ordering drives a two-phase pipeline: per-module type checking (with cross-module export injection) followed by sequential code generation and linking into a single Bytecode artifact.
File Resolution
Resolution follows Rust's module conventions:
mod foo;indir/mod.maat-->dir/foo.maatordir/foo/mod.maatmod bar;indir/foo.maat-->dir/foo/bar.maatordir/foo/bar/mod.maat
Ambiguous paths (i.e., when both alternatives exist) and missing paths both produce descriptive ModuleError values.
Usage
use resolve_module_graph;
use Path;
let graph = resolve_module_graph?;
let bytecode = compile_graph?;
API Docs
Repository
github.com/maatlabs/maat. See the project README for an overview of the full compiler pipeline.