1use crate::*;
4
5pub const LUA_COLIBNAME: &str = "coroutine";
10pub const LUA_TABLIBNAME: &str = "table";
11pub const LUA_IOLIBNAME: &str = "io";
12pub const LUA_OSLIBNAME: &str = "os";
13pub const LUA_STRLIBNAME: &str = "string";
14
15#[cfg(LUA_VERSION = "5.3")]
16pub const LUA_UTF8LIBNAME: &str = "utf8";
17
18#[cfg(LUA_VERSION = "5.2")]
19pub const LUA_BITLIBNAME: &str = "bit32";
20
21pub const LUA_MATHLIBNAME: &str = "math";
22pub const LUA_DBLIBNAME: &str = "db";
23pub const LUA_LOADLIBNAME: &str = "package";
24
25extern "C" {
30 pub fn luaL_openlibs(L: *mut lua_State);
31 pub fn luaopen_base(L: *mut lua_State) -> libc::c_int;
32
33 #[cfg(LUA_VERSION = "5.2")]
34 pub fn luaopen_bit32(L: *mut lua_State) -> libc::c_int;
35
36 #[cfg(LUA_VERSION = "5.2")]
37 pub fn luaopen_coroutine(L: *mut lua_State) -> libc::c_int;
38
39 pub fn luaopen_debug(L: *mut lua_State) -> libc::c_int;
40 pub fn luaopen_io(L: *mut lua_State) -> libc::c_int;
41 pub fn luaopen_math(L: *mut lua_State) -> libc::c_int;
42
43 #[cfg(LUA_VERSION = "5.1")]
44 pub fn luaopen_os(L: *mut lua_State) -> libc::c_int;
45
46 pub fn luaopen_package(L: *mut lua_State) -> libc::c_int;
47 pub fn luaopen_string(L: *mut lua_State) -> libc::c_int;
48 pub fn luaopen_table(L: *mut lua_State) -> libc::c_int;
49
50 #[cfg(LUA_VERSION = "5.3")]
51 pub fn luaopen_utf8(L: *mut lua_State) -> libc::c_int;
52}