use crate::source::directory_source::DirectorySource; use mlua::prelude::*; pub mod resources; pub mod sinks; pub mod source; fn directory_source(lua: &Lua, path: String) -> LuaResult { Ok(DirectorySource::from(path)) } #[mlua::lua_module] fn filesystem(lua: &Lua) -> LuaResult { let exports = lua.create_table()?; exports.set("directory_source", lua.create_function(directory_source)?)?; Ok(exports) }