-
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crate that implements FromLua and ToLua without specifying/packaging a Lua version? #202
Comments
crates like bevy_mod_scripting or tealr just forward the lua version features. if all your plugin crates need to use a specific lua version, then, just rely on that feature. |
The (Lua) source code is only packaged with I'd love to move some types def to a new crate, but I'm afraid the current definition of pub trait ToLua<'lua> {
fn to_lua(self, lua: &'lua Lua) -> Result<Value<'lua>>;
}
pub trait FromLua<'lua>: Sized {
fn from_lua(lua_value: Value<'lua>, lua: &'lua Lua) -> Result<Self>;
} As it has |
Ouch, I am using luau 🙂 I think it will end up fine in the long run for me. I'll leave this issue up in case you think this is something worth solving |
bit late, but part of that is because tealr's own api has to change depending on the lua version enabled in mlua. If I didn't then I could still only target basically 1 lua version or only allow things to be used that is common in all lua versions. Not great either way. I also don't think that just forwarding the features will work for other libraries. Tealr has the benefit of basically being a wrapper around mlua to give new features. But |
Hello, I am making a crate that implements an mlua compatibility layer with another crate I maintain, so that me and others can create separate mlua apps and use that.
Basically, I have crate
full-moon
, and would like to create afull-moon-lua-types
crate, so that anyone who uses full-moon can use the lua-types crate to add plugin support and such. This is necessary for selene to implement custom plugins.However, I cannot simply depend on mlua, since I need to specify a version. I can specify a version, of course, but then I believe it will try to package the source code, or other weirdness.
Is there any way to get what I want?
The text was updated successfully, but these errors were encountered: