Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ jobs:
- lua54,vendored
- lua54,vendored,send
- lua54,vendored,async
- lua54,vendored,derive
- lua54,vendored,macros
- lua54,vendored,macros,userdata-wrappers
- lua54,vendored,send,async
- lua54,vendored,send,derive
- lua54,vendored,async,derive
- lua54,vendored,send,async,derive
# Full feature set including serialize and macros
- lua54,vendored,send,async,derive,serialize,macros
- lua54,vendored,send,macros
- lua54,vendored,async,macros
- lua54,vendored,send,async,macros
# Full feature set including serde and macros
- lua54,vendored,send,async,serde,macros
# Luau feature combinations
- luau,vendored
- luau,vendored,send,async,derive,serialize,macros
- luau,vendored,macros,userdata-wrappers
- luau,vendored,send,async,serde,macros
steps:
- uses: actions/checkout@v6

Expand Down
32 changes: 16 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ repository = "https://github.com/Tired-Fox/mlua-extras"
keywords = ["lua", "mlua", "luajit", "luau", "scripting"]

[package.metadata.docs.rs]
features = ["mlua", "lua54", "send", "async", "derive", "vendored"]
features = ["mlua", "lua54", "send", "async", "macros", "vendored"]

[features]
mlua = ["dep:mlua"]
lua54 = ["mlua/lua54", "mlua"]
lua53 = ["mlua/lua53", "mlua"]
lua52 = ["mlua/lua52", "mlua"]
lua51 = ["mlua/lua51", "mlua"]
luajit = ["mlua/luajit", "mlua"]
luau = ["mlua/luau", "mlua"]
vendored = ["mlua/vendored", "mlua"]
serialize = ["mlua/serialize", "mlua"]
macros = ["mlua/macros", "mlua"]
module = ["mlua/module", "mlua"]
send = ["mlua/send", "mlua"]
async = ["mlua/async", "mlua"]
derive = ["dep:mlua-extras-derive"]
lua54 = ["mlua", "mlua/lua54"]
lua53 = ["mlua", "mlua/lua53"]
lua52 = ["mlua", "mlua/lua52"]
lua51 = ["mlua", "mlua/lua51"]
luajit = ["mlua", "mlua/luajit"]
luau = ["mlua", "mlua/luau"]
vendored = ["mlua/vendored"]
serde = ["mlua/serde"]
macros = ["mlua/macros", "dep:mlua-extras-derive"]
module = ["mlua/module"]
send = ["mlua/send"]
async = ["mlua/async"]
userdata-wrappers = ["mlua/userdata-wrappers"]

[dev-dependencies]
serde = { version = "1.0.228", features = ["derive"] }
Expand All @@ -42,7 +42,7 @@ strum = { version = "0.27.2", features = ["derive"], default-features = false }

[[example]]
name = "macros"
required-features = ["mlua", "derive"]
required-features = ["mlua", "macros"]

[[example]]
name = "enum_and_tuple"
Expand All @@ -54,4 +54,4 @@ required-features = ["mlua"]

[[example]]
name = "typed"
required-features = ["mlua", "derive", "serialize"]
required-features = ["mlua", "macros", "serde"]
2 changes: 1 addition & 1 deletion mlua_extras_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description = "MLua extras macros"
readme = "README.md"
homepage = "https://github.com/Tired-Fox/mlua-extras"
repository = "https://github.com/Tired-Fox/mlua-extras/tree/main/mlua_extras_derive"
keywords = ["lua", "types", "mlua", "macros", "derive"]
keywords = ["lua", "types", "mlua", "macros"]

[dependencies]
darling = "0.23.0"
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub mod extras;
#[cfg(feature="mlua")]
pub use mlua;

#[cfg(feature="derive")]
#[cfg(feature="macros")]
pub use mlua_extras_derive::{Typed, UserData, user_data_impl};

#[cfg(feature = "send")]
Expand All @@ -21,10 +21,10 @@ pub trait MaybeSend {}
#[cfg(not(feature = "send"))]
impl<T> MaybeSend for T {}

#[cfg(feature = "derive")]
#[cfg(feature = "macros")]
#[doc(hidden)]
pub trait __DefaultAutoMethods: Sized {
fn __auto_add_methods<M>(_m: &mut M) {}
}
#[cfg(feature = "derive")]
#[cfg(feature = "macros")]
impl<T: Sized> __DefaultAutoMethods for T {}
2 changes: 1 addition & 1 deletion src/typed/class/wrapped.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ impl<'ctx, T: UserData, U: UserDataMethods<T>> TypedDataMethods<T> for WrappedBu
}

#[cfg(test)]
#[cfg(all(feature = "async", feature = "derive"))]
#[cfg(all(feature = "async", feature = "macros"))]
mod tests {
use super::*;
use crate as mlua_extras;
Expand Down
Loading