Skip to main content

Module module_system

Module module_system 

Source
Expand description

Module system — import <iri> as name with a module graph (T63).

No npm. No vibe.toml dependency solver in 0.x. The catalog IS the module graph — modules declare their IRI, exports, and dependencies, and the resolver walks the graph to find them.

§Design

  • ModuleId: An IRI that uniquely identifies a module (e.g. https://qualiadb.org/modules/math).
  • ModuleEntry: Metadata for a module — IRI, version, exports (function names and types), dependencies (other module IRIs).
  • ModuleCatalog: The module graph — a collection of ModuleEntries with dependency edges. Supports cycle detection.
  • ModuleResolver: Resolves an import IRI to a ModuleEntry, checking the catalog first, then falling back to the host.

The catalog is built at host startup from the modules the host has available. Scripts import modules by IRI; the resolver checks the catalog and returns the entry (or an error if not found).

Reference: docs/vibescript-full-impl-PLAN.md §8.13 T63, excellence-first §2.7, ecosystem §3.4.

Structs§

ModuleCatalog
A module catalog — the module graph (T63).
ModuleEntry
A module entry — metadata for a module in the catalog (T63).
ModuleExport
A module export — a function or capability the module provides (T63).
ModuleId
A module identifier — an IRI that uniquely identifies a module (T63).
ModuleResolver
A module resolver — resolves an import IRI to a module entry (T63).

Enums§

ExportKind
The kind of module export (T63).

Functions§

default_catalog
Create a default catalog with built-in modules (T63).