Skip to main content

proof_engine/scripting/
mod.rs

1//! Proof Engine scripting system — pure-Rust Lua-like language engine.
2//!
3//! Implements a complete stack-based bytecode VM for a dynamically-typed
4//! scripting language with closures, tables, first-class functions, and
5//! a host API bridge.
6//!
7//! # Architecture
8//! ```text
9//! Source → Lexer → Parser → AST → Compiler → Bytecode → VM → Value
10//!                                                          ↑
11//!                                              HostFunctions (Rust callbacks)
12//! ```
13//!
14//! # Language features
15//! - Dynamic typing: nil, bool, int, float, string, table, function
16//! - First-class functions and closures
17//! - Tables (hash maps + arrays)
18//! - For/while/if/else control flow
19//! - Multiple return values
20//! - String interpolation
21//! - Metatables for operator overloading
22//! - `require` for multi-file scripts
23
24pub mod lexer;
25pub mod ast;
26pub mod parser;
27pub mod compiler;
28pub mod vm;
29pub mod stdlib;
30pub mod host;
31pub mod debugger;
32pub mod modules;
33
34pub use vm::{Vm, Value, ScriptError};
35pub use host::{ScriptHost, HostFunction};