diff --git a/src/lua.rs b/src/lua.rs index b765dfd..53a0b4b 100644 --- a/src/lua.rs +++ b/src/lua.rs @@ -557,6 +557,14 @@ impl Lua { } } + /// Loads the Lua debug library. + /// + /// The debug library is very unsound, loading it and using it breaks all + /// the guarantees of rlua. + pub unsafe fn load_debug(&self) { + ffi::luaL_requiref(self.state, cstr!("debug"), ffi::luaopen_debug, 1); + } + /// Loads a chunk of Lua code and returns it as a function. /// /// The source can be named by setting the `name` parameter. This is generally recommended as it