You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, I have a problem: I want to use this "module" function in another file. But see that #[mlua::lua_module]? That's a macro the mlua crate publishes, and it actually changes the name (and visibility) of the function it is attached to. It turns out it changes it to luaopen_module. But I didn't know that, so I installed rustsym.
So I run rustsym and:
Cool, so there's an exported function named "module".
Except no:
Eventually I figure out I can also use cargo doc --open for this purpose. Here's what it says exists:
Expected behavior
I think rustsym gave the incorrect name for luaopen_module because it doesn't run macros, whereas cargo doc --open gave the correct name because it did. Ideally rustsym should run macros.
The text was updated successfully, but these errors were encountered:
The problem
So I've got this small project (can provide you a git repo if it helps) that uses the "mlua" crate. I have a file with this code:
Now, I have a problem: I want to
use
this "module" function in another file. But see that#[mlua::lua_module]
? That's a macro the mlua crate publishes, and it actually changes the name (and visibility) of the function it is attached to. It turns out it changes it toluaopen_module
. But I didn't know that, so I installedrustsym
.So I run rustsym and:
Cool, so there's an exported function named "module".
Except no:
Eventually I figure out I can also use
cargo doc --open
for this purpose. Here's what it says exists:Expected behavior
I think rustsym gave the incorrect name for
luaopen_module
because it doesn't run macros, whereascargo doc --open
gave the correct name because it did. Ideally rustsym should run macros.The text was updated successfully, but these errors were encountered: