basic Lua 5.4 implementation with few example commands

This commit is contained in:
Priler 2026-01-17 05:46:38 +05:00
parent 11c2500d9c
commit 7440baa1b2
35 changed files with 2554 additions and 460 deletions

View file

@ -0,0 +1,28 @@
mod engine;
mod sandbox;
mod error;
mod api;
mod structs;
pub use structs::*;
pub use engine::LuaEngine;
pub use sandbox::SandboxLevel;
pub use error::LuaError;
use std::path::PathBuf;
use std::time::Duration;
#[cfg(test)]
mod tests;
// Execute a Lua command script
pub fn execute(
script_path: &PathBuf,
context: CommandContext,
sandbox: SandboxLevel,
timeout: Duration,
) -> Result<CommandResult, LuaError> {
let engine = LuaEngine::new(sandbox)?;
engine.execute(script_path, context, timeout)
}