Skip to main content

Module modules

Module modules 

Source
Expand description

Module system — loading, caching, dependency resolution, hot-reload.

§Architecture

PackageManager
  └─ ModuleRegistry
       ├─ Module (Unloaded / Loading / Loaded / Error)
       └─ StringMapLoader / FileLoader
Namespace  — hierarchical name lookup
HotReloadWatcher — timestamp-based change detection

Structs§

HotReloadWatcher
Tracks file modification timestamps and detects changes. Uses a HashMap<String, u64> for timestamps (simulated or real).
Module
A compiled and (optionally) executed script module.
ModuleId
FNV-1a hash of a module path.
ModuleRegistry
Maintains the full module graph with circular-dependency detection.
Namespace
Hierarchical name lookup. E.g. math.sin → table field.
PackageManager
Tries multiple search paths and file suffixes when loading modules.
StringMapLoader
Loads modules from an in-memory map of path -> source.

Enums§

LoadStatus

Traits§

ModuleLoader
Pluggable backend for loading module source code.