Expand description
Standard library compilation for Shape VM
This module handles compiling the core stdlib modules at engine initialization. Core modules are auto-imported and available without explicit imports. Domain-specific modules (finance, iot, etc.) require explicit imports.
Functionsยง
- compile_
core_ modules - Compile all core stdlib modules into a single BytecodeProgram
- compile_
core_ modules_ from_ source - Compile core stdlib from source (parse + compile). Used as fallback and for tests.
- compile_
directory - Compile all Shape files in a directory (recursively) into a single BytecodeProgram.
Each file is compiled independently, then merged via
merge_append. - compile_
file - Compile a single Shape file into a BytecodeProgram
- compile_
source - Compile an in-memory Shape source string into a BytecodeProgram.
Used for extension-bundled Shape code (e.g.,
include_str!("duckdb.shape")). - core_
binding_ names - Extract top-level binding names from precompiled core bytecode. Used to seed the compiler with known names without loading AST into persistent context.