fn main() {
let lua = unsafe { Lua::unsafe_new() };
let helloworld = "test";
let _ = lua.load(chunk!{
print($helloworld)
});
}
Hi I'm wondering is there a way to separate chunk! content to a separate variable and pass it in? Below is wrong since chunk! will use it as a rust variable but just to describe what I mean.
fn main() {
let lua = unsafe { Lua::unsafe_new() };
let helloworld = "test";
let lua_code = "print($helloworld)";
let _ = lua.load(chunk!{
$lua_code
});
}
Hi I'm wondering is there a way to separate chunk! content to a separate variable and pass it in? Below is wrong since chunk! will use it as a rust variable but just to describe what I mean.