2 releases

0.0.2 Jun 22, 2024
0.0.1 May 11, 2024

#996 in Programming languages

Download history 40/week @ 2024-07-30 9/week @ 2024-09-10 6/week @ 2024-09-17 12/week @ 2024-09-24 9/week @ 2024-10-01

131 downloads per month

MIT license

24KB
577 lines

rigz_lua

The core module used for rigz currently, uses mlua to power the runtime.

cargo add rigz_lua
use std::collections::HashMap;
use std::path::PathBuf;
use rigz_lua::LuaModule;

fn main() {
    let modules: HashMap<String, Box<dyn Module>> = HashMap::new();
    
    let module_root: PathBuf = PathBuf::from("/path/to/module");
    let source_files = vec![PathBuf::from("module/path/to/file.lua")];
    let input_files: HashMap<String, Vec<File>> = HashMap::new();
    let config: Option<serde_value::Value> = None;
    let lua = LuaModule::new("hello_world", module_root, source_files, input_files, config);
    
    modules.insert(lua.name(), lua)
}

Dependencies

~2.2–5MB
~91K SLoC