use crate::stingray_sdk::lua_State; use crate::{LUA, global}; pub extern "C" fn do_something(l: *mut lua_State) -> i32 { let lua = global!(LUA); if let Some(name) = lua.tolstring(l, 1) { lua.pushstring( l, format!("[do_something] Hello from Rust, {}", name.to_string_lossy()), ); 1 } else { 0 } }