Skip to main content

luars/
lib.rs

1// Lua Runtime
2// A compact Lua VM implementation with bytecode compiler and GC
3
4// Allow the derive macro to use `luars::...` paths even inside this crate
5extern crate self as luars;
6
7#[cfg(test)]
8mod test;
9
10pub mod compiler;
11pub mod gc;
12pub mod lib_registry;
13pub mod lua_value;
14pub mod lua_vm;
15pub mod stdlib;
16
17#[cfg(feature = "serde")]
18pub mod serde;
19
20// Re-export the derive macros so users can `use luars::LuaUserData;`
21pub use luars_derive::LuaUserData;
22pub use luars_derive::lua_methods;
23
24// Re-export userdata trait types at crate root for convenience
25pub use lua_value::LuaUserdata;
26pub use lua_value::userdata_trait::{
27    LuaEnum, LuaMethodProvider, LuaRegistrable, LuaStaticMethodProvider, UdValue, UserDataTrait,
28};
29
30#[cfg(test)]
31use crate::lua_vm::SafeOption;
32pub use gc::*;
33pub use lib_registry::LibraryRegistry;
34pub use lua_value::RustCallback;
35pub use lua_value::lua_convert::{FromLua, IntoLua};
36pub use lua_value::{Chunk, LuaFunction, LuaTable, LuaValue};
37pub use lua_vm::async_thread::{AsyncCallHandle, AsyncFuture, AsyncReturnValue, AsyncThread};
38pub use lua_vm::lua_error::LuaFullError;
39pub use lua_vm::table_builder::TableBuilder;
40pub use lua_vm::{Instruction, LuaResult, LuaVM, OpCode};
41pub use stdlib::Stdlib;