Expand description
Proof Engine scripting system — pure-Rust Lua-like language engine.
Implements a complete stack-based bytecode VM for a dynamically-typed scripting language with closures, tables, first-class functions, and a host API bridge.
§Architecture
Source → Lexer → Parser → AST → Compiler → Bytecode → VM → Value
↑
HostFunctions (Rust callbacks)§Language features
- Dynamic typing: nil, bool, int, float, string, table, function
- First-class functions and closures
- Tables (hash maps + arrays)
- For/while/if/else control flow
- Multiple return values
- String interpolation
- Metatables for operator overloading
requirefor multi-file scripts
Re-exports§
pub use vm::Vm;pub use vm::Value;pub use vm::ScriptError;pub use host::ScriptHost;pub use host::HostFunction;
Modules§
- ast
- Abstract Syntax Tree for the scripting language.
- compiler
- Bytecode compiler — walks the AST and emits
Opinstructions into aProto. - debugger
- Script debugger — breakpoints, stepping, locals inspection, coverage tracking.
- host
- Host bridge — exposes Rust functions and objects to the scripting VM.
- lexer
- Lexer — tokenizes script source into a token stream.
- modules
- Module system — loading, caching, dependency resolution, hot-reload.
- parser
- Recursive-descent parser — converts token stream into AST.
- stdlib
- Standard library for the scripting engine.
- vm
- Stack-based bytecode virtual machine.