TinyLJ

Github

Fork of luajit-rs

Crate for interfacing with LuaJIT from Rust, for running high-performance Lua code that can integrate with native-code written in rust.

Getting Started

```rust use tinylj::{cint, State, luafn};

fn return42(state: &mut State) -> cint { state.push(42);

1

}

pub fn main() { let mut state = State::new(); state.openlibs(); state.dostring(r#"print("Hello world!")"#);

state.push(lua_fn!(return_42));
state.set_global("return_42");
state.do_string(r#"print(return_42())"#);

} ```