Skip to main content

shape_runtime/engine/
stdlib.rs

1//! Standard library loading
2//!
3//! Only `stdlib/core/` is autoloaded. Domain-specific modules (finance, iot, etc.)
4//! must be explicitly imported by user code.
5
6use shape_ast::error::Result;
7
8impl super::ShapeEngine {
9    /// Load stdlib core modules only.
10    /// Domain-specific modules (finance, iot, etc.) require explicit import.
11    pub fn load_stdlib(&mut self) -> Result<()> {
12        self.runtime
13            .load_core_stdlib_into_context(&self.default_data)
14    }
15}