Commit Graph

86 Commits

Author SHA1 Message Date
Alex Orlenko 743325f7d6 clippy 2026-06-06 14:28:31 +01:00
Alex Orlenko 38c05b850e mlua_derive: Improve error reporting for #[lua] attributes 2026-05-31 13:32:33 +01:00
Alex Orlenko e9271d2e32 mlua_derive: Use correct Span in metamethod name validation error 2026-05-31 13:17:40 +01:00
Alex Orlenko e6d16815d7 mlua_derive: Improve context-aware validation for #[lua] attr 2026-05-31 12:56:15 +01:00
Alex Orlenko ae88e8acf8 mlua_derive: Detect (and reject) all generic type parameters in UserData derive 2026-05-31 12:31:35 +01:00
Alex Orlenko fcab60bac4 mlua_derive: Fix #[lua(meta, field)] case 2026-05-31 12:28:06 +01:00
Alex Orlenko a7c5a24a7b mlua_derive: Deny #[lua = "..."] syntax 2026-05-30 22:23:03 +01:00
Alex Orlenko b7c98ad9bb mlua_derive: Switch from #[userdata] to [derive(UserData)] 2026-05-30 13:11:26 +01:00
Alex Orlenko 1f3dafa564 mlua_derive: Reject static field functions with args 2026-05-30 12:46:31 +01:00
Alex Orlenko 1d4a756436 mlua_derive: Support async userdata methods in macro 2026-05-29 00:56:33 +01:00
Alex Orlenko 6e7d6c78ed mlua_derive: Group functionality in modules
Create new `chunk`, `userdata`, `module` modules.
2026-05-26 23:23:09 +01:00
Alex Orlenko 023e4c61d8 mlua_derive: Fix compilation / remove "if let" guards 2026-05-26 23:23:09 +01:00
Alex Orlenko 92bd06d3c1 mlua_derive: Refactor Capture implementation for chunk! 2026-05-26 23:23:09 +01:00
Alex Orlenko d8544bf038 mlua_derive: Optimize Captures::add 2026-05-26 23:23:09 +01:00
Alex Orlenko 7114c03489 mlua_derive: Remove unneeded Span::line hack for chunk! since we use Rust 1.95+ 2026-05-26 23:23:09 +01:00
Alex Orlenko f4cacc524e mlua_derive: Bump MSRV to 1.88 2026-05-26 23:23:09 +01:00
Alex Orlenko cc7f7ce7b7 mlua_derive: show better error message when $ is not followed by ident 2026-05-26 23:23:09 +01:00
Alex Orlenko 72de602ec3 Fix modules compilation after switching to 2024 edition in mlua_derive 2026-05-26 23:23:09 +01:00
Alex Orlenko 1573dd1242 Add #[mlua::userdata] and #[mlua::userdata_impl] macros 2026-05-26 23:23:09 +01:00
Alex Orlenko 1ec4661bf9 mlua_derive: v0.11.0 2025-07-07 22:58:41 +01:00
Alex Orlenko 646827a6bb Update Table::set_metatable
- Return Err (instead of panic) when trying to change readonly table (Luau)
- Slightly optimize performance
2025-07-06 11:37:02 +01:00
Alex Orlenko b57a6239a6 mlua_derive: v0.11.0-beta.2 2025-06-06 23:20:01 +01:00
Alex Orlenko 13395e9c3d Sync mlua_derive with AsChunk trait 2025-05-27 00:54:24 +01:00
Alex Orlenko 9b45663afd v0.11.0-beta.1 2025-05-06 23:25:26 +01:00
Alex Orlenko 4e5677ae54 Update references to mlua repo 2025-04-06 15:37:38 +01:00
Alex Orlenko bd13300288 Update dependencies 2025-04-05 18:30:22 +01:00
Alex Orlenko 58965c6255 Move lifetime from AsChunk<'a> to AsChunk::source 2025-01-28 18:17:29 +00:00
Alex Orlenko aa061bce6f mlua_derive: v0.10.1 2024-12-01 12:55:50 +00:00
Evie 031854fa2a Switch proc-macro-error to proc-macro-error2 (#493) 2024-11-30 22:37:40 +00:00
Alex Orlenko 4f56575e05 v0.10.0 2024-10-25 13:36:55 +02:00
Alex Orlenko 669349d704 mlua_derive: v0.10.0-rc.1 2024-10-08 22:40:07 +01:00
Alex Orlenko fb0c0d9ee9 Add Either<L, R> enum to combine two types into a single one.
It implements `FromLua` and `IntoLua` traits for easy type conversions..
2024-09-26 18:58:28 +01:00
Alex Orlenko 5db545e7b4 mlua_derive: v0.10.0-beta.1 2024-09-07 23:46:13 +01:00
Alex Orlenko c6ef393ce9 Turn Lua::entrypoint() to constructor (don't require initializing Lua first) 2024-09-02 23:43:52 +01:00
Alex Orlenko b4892c228c Add rustfmt.toml 2024-07-31 13:42:37 +01:00
Alex Orlenko 7221051683 Refactor:
- Remove the rest of `'lua` lifetimes
- Remove Owned types
2024-07-31 13:42:35 +01:00
Alex Orlenko 0fa39d431d mlua_derive: v0.9.3 2024-05-15 23:14:23 +01:00
Joris Willems ffc4bd599c Fix module imports for export (#394) 2024-04-18 10:22:41 +01:00
Yiyu Lin b62f2ee0f7 chore: make clippy happy (#388)
Co-authored-by: hzlinyiyu <hzlinyiyu@corp.netease.com>
2024-03-25 13:26:06 +00:00
Alex Orlenko 75a15ceabf v0.9.5 2024-01-25 22:24:58 +00:00
Alex Orlenko 38eec1236c Update itertools dependency 2024-01-25 10:49:39 +00:00
Alex Orlenko 145c5b316b Fix FromLua derive proc macro to cover more cases 2024-01-25 10:26:43 +00:00
Alex Orlenko eed48889cd v0.9.4 2024-01-10 15:41:31 +00:00
Alex Orlenko b5896173fd Include skip_memory_check code only when the corresponding attribute set for module 2024-01-10 10:08:33 +00:00
Alex Orlenko 205989f569 Fix edge case when loading many-in-one module from thread without using its state.
If Lua previously been initialized in main thread and then new module was loaded from thread
we reuse old state which confuses Lua loader.
2024-01-10 00:37:02 +00:00
Alex Orlenko 17809a390c mlua_derive: v0.9.0 2023-08-16 01:25:12 +01:00
Alex Orlenko 114f072269 Update module entrypoint function.
Return c_int instead of Result (and avoid potential panic on Rust side).
2023-07-31 17:49:07 +01:00
Alex Orlenko 1dd62c5ffc mlua_derive: v0.9.0-rc.2 2023-07-28 00:23:04 +01:00
Alex Orlenko 8b71f94141 Fix AsChunk trait to support capturing wrapped Lua types (AnyUserData::wrap() and Function::wrap()).
This is a breaking change, the `'lua` lifetime used to in environment moved to the trait declaration.
2023-07-27 13:56:48 +01:00
Alex Orlenko 9f5325ef2f Use c-unwind ABI (Rust 1.71+) 2023-07-22 23:54:30 +01:00