diff options
Diffstat (limited to 'src/lua/runtime.rs')
| -rw-r--r-- | src/lua/runtime.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lua/runtime.rs b/src/lua/runtime.rs index dfb37e6..4e8c52b 100644 --- a/src/lua/runtime.rs +++ b/src/lua/runtime.rs @@ -3,17 +3,20 @@ use std::time::{SystemTime, UNIX_EPOCH}; use crate::{ config::{self, GlobalConfig}, - sheet::register::Register, + sheet::register::Register, state::GlobalState, }; pub fn neosheet(lua: &Lua) -> Result<()> { let exports = lua.create_table()?; exports - .set("sheets", lua.create_proxy::<Register>()?) + .set("sheets", lua.create_userdata(Register)?) .unwrap(); exports - .set("config", lua.create_userdata(GlobalConfig::new())?) + .set("config", lua.create_userdata(GlobalConfig::default())?) + .unwrap(); + exports + .set("state", lua.create_userdata(GlobalState::default())?) .unwrap(); lua.globals() |