luau 0.732.0

Safe lifetime-bound Rust embedding API for the Luau runtime
1
2
3
4
5
6
7
8
9
10
use luau::Lua;

fn main() -> luau::Result<()> {
    let lua = Lua::new()?;

    let value: i32 = lua.load("return 40 + 2").set_name("run_script").call(())?;

    println!("{value}");
    Ok(())
}