Alex Orlenko
b1f99aa852
Update tests
2026-01-17 13:26:13 +00:00
Alex Orlenko
77d7d5d6bd
Add initial Lua 5.5 support
2026-01-13 23:43:31 +00:00
Alex Orlenko
560a30ca02
Support new Luau require system
...
This commit introduces the `Require` trait that be used to change `require` behaviour.
By default mlua implements behaviour same as `ReplRequirer` in the original Luau.
Unfortunately binary Luau modules are no longer supported by the new system.
2025-04-25 14:19:41 +01:00
Alex Orlenko
825bdbfa04
Use dynamic Lua state ownership instead of compile-time module cfg flag to allow
...
creating new VMs in module mode (and destructing them properly).
2024-08-31 22:52:55 +01: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
2bee5ed33a
Support binary modules for Luau on cfg(unix)
2023-11-16 15:54:25 +00:00
Alex Orlenko
ead6be4a52
Make module and vendored features mutually exclusive
2023-07-20 23:23:03 +01:00
Alex Orlenko
483e6be207
Support vendored module mode for windows (raw-dylib linking)
...
This is requires Rust 1.71+
2023-07-20 00:43:57 +01:00
Alex Orlenko
44533d2c9d
Add new module attribule skip_memory_check to improve performance
...
in module mode (by skipping memory allocations check) with extra risks.
2023-07-10 00:43:19 +01:00
Alex Orlenko
22fbcfd9fb
Update edition everywhere
2023-03-12 01:03:31 +00:00
Alex Orlenko
87d027e8ac
Rename rust_module in tests to test_module
...
This causes warning during compilation
2023-03-03 18:58:13 +00:00
Alex Orlenko
8339621f9c
Rename to_lua_err -> into_lua_err
2023-01-06 21:35:15 +00:00
Alex Orlenko
9d28b790e7
Fix module tests
2022-12-21 21:05:23 +00:00
Alex Orlenko
0aa30226df
Check for invalid args when parsing #[lua_module(...)] proc macro
2022-12-18 00:35:41 +00:00
rise0chen
b532f86674
feat: Support custom name of lua_module
2022-12-18 00:35:41 +00:00
Alex Orlenko
1807fa789c
Don't require Lua sources for modules in build system
2022-05-07 22:16:54 +01:00
Alex Orlenko
559f9e6c6b
Add target.aarch64-apple-darwin conf to module examples
2021-10-11 18:07:34 +01:00
Alex Orlenko
6e52bb7e65
Fix clippy warnings && tests
2021-06-13 23:30:54 +01:00
Alex Orlenko
08ffeb0ca9
Improve module mode:
...
- Don't hide module function inside `luaopen_%` function.
- Raise Lua exception instead of panic if module function returns error.
2021-06-13 22:38:51 +01:00
Alex Orlenko
e8de2a458a
Allow multiple entrypoints in a single module share the same Lua state.
...
Previously it would initialize different Lua instances.
Fixes #49 .
2021-05-18 20:07:34 +01:00
Alex Orlenko
2eb40deafd
Add test to check loading module from lua coroutine (thread)
2020-06-07 20:38:19 +01:00
Alex Orlenko
5952a1f709
New module feature
...
Don't link module with Lua core (see: http://lua-users.org/wiki/BuildingModules )
Example and tests for modules
2020-06-07 20:38:11 +01:00