Hi! Thanks for creating this library, I've been enjoying using it while learning Rust at the same time.
My question is mostly regarding something aesthetic: I am currently loading a Lua script as a string (using include_str!) into a Chunk, and then calling set_name("prelude.lua") on it (I'm not loading the script from a file as I want to have everything contained in a single binary file).
When I run code and I get an error, I get a stacktrace like the following:
The question then: is there a way maybe of changing the [string "prelude.lua"] part? I would like it to say just prelude.lua, as if it was loaded from a Path. Or maybe any value, but it seems like [string ...] always get added afterwards.
The behaviour is mostly defined in Lua itself. If you want to see a file name (instead of "string ...") try adding = prefix.
Eg: set_name("=prelude.lua")
Hi! Thanks for creating this library, I've been enjoying using it while learning Rust at the same time. My question is mostly regarding something aesthetic: I am currently loading a Lua script as a string (using
include_str!
) into a Chunk, and then callingset_name("prelude.lua")
on it (I'm not loading the script from a file as I want to have everything contained in a single binary file).When I run code and I get an error, I get a stacktrace like the following:
The question then: is there a way maybe of changing the
[string "prelude.lua"]
part? I would like it to say justprelude.lua
, as if it was loaded from a Path. Or maybe any value, but it seems like[string ...]
always get added afterwards.Thanks!