Skip to main content

Crate sage_loader

Crate sage_loader 

Source
Expand description

Module loader for Sage projects.

This crate handles:

  • Loading single-file programs
  • Loading multi-file projects with sage.toml
  • Module tree construction from mod declarations
  • Cycle detection in imports

Structs§

ModuleTree
A complete module tree for a Sage project.
ParsedModule
A parsed module with its source and AST.
ProjectManifest
A Sage project manifest (sage.toml).
TestConfig
The test section of sage.toml.
TestFile
A discovered test file with its parsed contents.

Enums§

LoadError
Errors that can occur during module loading.

Functions§

discover_test_files
Discover all *_test.sg files in a project.
load_project
Load a project from a sage.toml or project directory.
load_project_with_packages
Load a project with external package resolution.
load_single_file
Load a single .sg file (no project structure).
load_test_files
Load all test files in a project.

Type Aliases§

ModulePath
A module path like ["agents", "researcher"].