2021-06-27 23:13:38 +02:00
2021-06-27 23:12:34 +02:00
2019-02-02 23:33:44 -05:00
2017-10-27 10:06:40 -04:00
2017-12-02 04:40:08 +00:00
2021-06-27 23:12:34 +02:00
2021-06-27 23:12:34 +02:00
2018-01-06 21:20:38 -05:00
2019-02-03 00:09:20 -05:00

Luajit RS

Documentation

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

Getting Started

#[macro_use]
extern crate luajit;

use luajit::{c_int, State};

fn return_42(state: &mut State) -> c_int {
    state.push(42);

    1
}

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

    state.push(lua_fn!(return_42));
    state.set_global("return_42");
    state.do_string(r#"print(return_42())"#);
}
S
Description
No description provided
Readme MIT
82 KiB
0 Stars 0 Watchers 0 Forks
Languages
Rust 99.7%
Lua 0.3%