why is there no coroutine

This commit is contained in:
Quaternions 2024-10-16 18:44:24 -07:00
parent 3ac9d2f2cd
commit 684c60b092

View File

@ -36,7 +36,16 @@ fn scheduler_mut<T>(lua:&mlua::Lua,mut f:impl FnMut(&mut crate::scheduler::Sched
} }
fn init(lua:&mlua::Lua)->mlua::Result<()>{ fn init(lua:&mlua::Lua)->mlua::Result<()>{
lua.sandbox(true)?; lua.sandbox(true)?;
lua.load_std_libs(
mlua::StdLib::COROUTINE
|mlua::StdLib::TABLE
|mlua::StdLib::OS
|mlua::StdLib::STRING
|mlua::StdLib::UTF8
|mlua::StdLib::BIT
|mlua::StdLib::MATH
|mlua::StdLib::BUFFER
)?;
//global environment //global environment
let globals=lua.globals(); let globals=lua.globals();