pub struct Runner{ lua:mlua::Lua, } fn init(lua:&mlua::Lua)->mlua::Result<()>{ Ok(()) } impl Runner{ pub fn new()->mlua::Result{ let runner=Self{ lua:mlua::Lua::new(), }; init(&runner.lua)?; Ok(runner) } pub fn set_script(&self,script:rbx_dom_weak::types::Ref)->mlua::Result<()>{ Ok(()) } pub fn run(&self,source:String,context:&mut crate::context::Context)->mlua::Result<()>{ //Set up dom access here? self.lua.load(source).exec() } }