From 68ae5e57779f361769d1f7ec42dce5e3e96dbf4d Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 16 Oct 2024 18:44:24 -0700 Subject: [PATCH] why is there no coroutine --- src/runner/runner.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/runner/runner.rs b/src/runner/runner.rs index c3a4995..554d135 100644 --- a/src/runner/runner.rs +++ b/src/runner/runner.rs @@ -36,7 +36,16 @@ fn scheduler_mut(lua:&mlua::Lua,mut f:impl FnMut(&mut crate::scheduler::Sched } fn init(lua:&mlua::Lua)->mlua::Result<()>{ 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 let globals=lua.globals();