rglua
rglua copied to clipboard
Toolkit for garrysmod development with the source sdk and lua c api
Need to look into this, functions like ``IsInCommentaryMode`` just crash.
Should be pretty easy to do with ``std::panic::catch_unwind`` and ``std::panic::set_hook``. This is sort of related to #10, although instead there it openly ``.unwrap()``s so it is our fault that it...
Something like ```rs #[lua_hook("Think")] fn think() {} ``` Which would be called inside gmod13_open, would register a hook like: ```lua hook.Add("Think", "module." .. file!() .. ".rs", think_fn) ```
Allow functions without return values to be used as lua functions or entrypoints. Just return zero in the outer exposed function.
Maybe Engine, Lua State, etc can be unified into one "Gmod" state object. I don't know the extent of proc-macros but I hope this can happen. Example clientside binary module...