lua_rust
lua syntax parser & runtime interpreter in Rust
- LALR(1), GLR parser
- syntax referenced from lua 5.4 reference manual
- Greatly in progress
- grammar fully implemented
- std library barely implemented
Cargo Features
32bit
: use 32bit integer and float forlua numeric
type
How to use
As library, add lua_ir
crate to your Cargo.toml
[]
= "..."
let mut env = new;
env.eval_chunk?;
env.eval_chunk?;
env.eval_chunk?;
// Hello, World!
let hello_value = env.get_global?;
let world_value = env.get_global?;
env.set_global?;
Simply running
$ cargo run <source_file.lua>
or
$ cargo run
will start lua REPL. Note that this executable is not cargo publish
ed.