shape-runtime 0.3.2

Bytecode compiler, builtins, and runtime infrastructure for Shape
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Standard library loading
//!
//! Only `stdlib/core/` is autoloaded. Domain-specific modules (finance, iot, etc.)
//! must be explicitly imported by user code.

use shape_ast::error::Result;

impl super::ShapeEngine {
    /// Load stdlib core modules only.
    /// Domain-specific modules (finance, iot, etc.) require explicit import.
    pub fn load_stdlib(&mut self) -> Result<()> {
        self.runtime
            .load_core_stdlib_into_context(&self.default_data)
    }
}