low-luajit 0.4.0

Low level but safe bindings to the LuaJIT C API with no dependencies and no-std support to create Lua modules using Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// This "example" is used internally by me for testing whenever developing new features, so it's not a real example...

#![cfg(not(doc))]

use low_luajit::{AmountReturned, LuaState};

extern "C-unwind" fn test(lua: LuaState) -> AmountReturned {
	lua.return_none()
}

#[unsafe(no_mangle)]
extern "C-unwind" fn luaopen_test(lua: LuaState) -> AmountReturned {
	lua.return_cfunction(test)
}