Alex Orlenko
ef4eabd327
Don't use Value::as_str() internally
2025-07-01 22:51:16 +01:00
Alex Orlenko
a3302afdc1
Deprecate Value::as_str and Value::as_string_lossy
...
These methods don't follow Rust naming convention, see
https://rust-lang.github.io/api-guidelines/naming.html#ad-hoc-conversions-follow-as_-to_-into_-conventions-c-conv
2025-07-01 22:35:40 +01:00
Alex Orlenko
dfb4e9a668
Fix LuaJIT stack inspection tests
2025-07-01 21:40:06 +01:00
Alex Orlenko
92db0f6d3a
Fix Lua::inspect_stack callback proto
2025-06-30 23:28:04 +01:00
Alex Orlenko
a3697ab1db
Add Debug::function method to get function running at a given level.
...
Close #607
2025-06-30 23:25:36 +01:00
Alex Orlenko
052740db15
Save lua_State at the moment of constructing Debug instead of resolving it dynamically
2025-06-30 22:38:46 +01:00
Alex Orlenko
faf547c154
Refactor Lua::inspect_stack and debug interface.
...
It was possible to cause a crash when getting a `Debug` instance and keeping it while deallocating the Lua stack frames.
2025-06-30 12:21:10 +01:00
Alex Orlenko
0de7cd1c7d
Don't move or wrap ffi::lua_Debug struct when inspecting stack
...
This can cause a crash if `ffi::lua_Debug` changed between `lua_getstack` and `lua_getinfo` calls.
Fixes #610
2025-06-29 11:49:34 +01:00
Alex Orlenko
58953e5635
v0.11.0-beta.3
v0.11.0-beta.3
2025-06-23 23:23:07 +01:00
Alex Orlenko
6406de405d
mlua-sys: v0.8.1
2025-06-23 23:22:53 +01:00
Alex Orlenko
727096dd3b
Handle OOM error during luau_load (Luau >= 0.679)
2025-06-23 23:22:36 +01:00
Alex Orlenko
2445230759
Update CHANGELOG
2025-06-23 22:44:36 +01:00
Alex Orlenko
1cd2bdc808
Ignore test_async_require on windows
2025-06-23 16:37:46 +01:00
Alex Orlenko
f8ed33a2aa
Fix tests
2025-06-23 16:23:53 +01:00
Alex Orlenko
25955893e0
(Luau Require) Resolve Lua file path relative to the current directory
...
and unrelated to Rust source file location.
When a Lua file is required inside a Rust file (in a chunk), we should resolve the Lua file relative to the current directory,
instead of relative to the Rust chunk path.
The Rust file location is an internal information that does not exist when the compiled binary runs.
Fixes #605
2025-06-23 15:53:35 +01:00
Alex Orlenko
3f0c69b70b
Fix logic to terminate futures on drop.
...
The underlying Lua thread must stay in yielded state rather than finished.
2025-06-17 15:25:21 +01:00
Alex Orlenko
9da98d42c7
Move ref_stack_pop into ExtraData method.
2025-06-16 22:25:26 +01:00
Alex Orlenko
f539f60987
Fix Function::deep_clone() method (Luau).
...
The `lua_clonefunction` function can fail (and trigger GC) so we need to return Result instead of allowing longjmp
2025-06-16 21:41:29 +01:00
Alex Orlenko
aa187e6663
Increase REF_STACK_RESERVE to 3 slots
2025-06-16 21:37:16 +01:00
Alex Orlenko
ec10bf2a39
Revert 2e0e86dab2 (Update stack_value helper)
2025-06-16 21:33:47 +01:00
Alex Orlenko
3ea80b763d
cargo fmt
2025-06-16 11:21:51 +01:00
Alex Orlenko
2e0e86dab2
Update stack_value helper.
...
It uses zero stack spaces in Luau, and ref thread for `WrappedError` check in ther Lua versions.
Close #597
2025-06-16 11:12:53 +01:00
Alex Orlenko
0ac7aebb27
Update Lua::sandbox doc
2025-06-13 15:51:31 +01:00
Alex Orlenko
634e5d4550
Reduce collectgarbage options in sandboxed mode
...
See https://luau.org/sandbox#library
2025-06-13 15:47:54 +01:00
Alex Orlenko
05d6c20520
One more mismatched-lifetime-syntaxes
2025-06-12 23:44:47 +01:00
Alex Orlenko
63e7cfd31b
Satisfy mismatched-lifetime-syntaxes lint (nightly)
...
See rust-lang/rust#141787
2025-06-12 16:30:48 +01:00
Alex Orlenko
9c24c99cbe
v0.11.0-beta.2
v0.11.0-beta.2
2025-06-12 14:12:46 +01:00
Alex Orlenko
62f84828f2
Open some doc(hidden) functionality
2025-06-12 13:42:26 +01:00
Alex Orlenko
7bc72be7d3
Use serde feature flag instead of serialize.
...
The old one is still supported.
2025-06-12 13:35:22 +01:00
Ron Tseytlin
2fbbbe4238
Fix minor grammar mistakes in README.md ( #591 )
2025-06-12 12:57:11 +01:00
Alex Orlenko
f00208373e
Bump lua-src
2025-06-12 00:17:29 +01:00
Alex Orlenko
a2dc662a92
Add RawLua::create_table_from (internal)
2025-06-11 23:55:06 +01:00
Alex Orlenko
caeac2e9a3
Add private app_data container for mlua internal use
2025-06-11 22:24:26 +01:00
Alex Orlenko
3d5261640d
Fix doc warnings
2025-06-06 23:25:36 +01:00
Alex Orlenko
b57a6239a6
mlua_derive: v0.11.0-beta.2
2025-06-06 23:20:01 +01:00
Alex Orlenko
031424f6ce
Update dev dependencies
2025-06-06 23:17:58 +01:00
Alex Orlenko
c4c9609ac6
mlua-sys: v0.8.0
2025-06-06 23:09:30 +01:00
Alex Orlenko
6fcd18e434
Update CHANGELOG
2025-06-06 16:03:59 +01:00
Alex Orlenko
39cac5699a
Add unwinding support (returning an Error) to Luau Require implementation
2025-06-06 13:46:51 +01:00
Alex Orlenko
e6e1ef014f
Some cosmetic changes (Luau "require")
2025-06-05 23:11:14 +01:00
Alex Orlenko
942a443592
Bump Lua 5.4 to 5.4.8
2025-06-05 15:02:47 +01:00
Alex Orlenko
65e292dac4
More Luau require tests
2025-06-03 23:01:50 +01:00
Alex Orlenko
1a82f83644
Move parking_lot/send_guard from send to userdata-wrappers feature.
...
Related to #553
2025-05-30 23:20:06 +01:00
Alex Orlenko
38fbd08c72
Use luau0-src v0.15.0 (Luau 0.676)
2025-05-30 21:56:27 +01:00
Alex Orlenko
b3854d2f1d
Add '=' prefix to __mlua_bind name
2025-05-28 14:03:10 +01:00
Alex Orlenko
00a56b115b
Add LuaBorrowedBytes/LuaBorrowedStr to prelude
2025-05-28 14:01:35 +01:00
Alex Orlenko
2fefaafaa6
Update "AnyUserData::take" to work on ref thread without need to push into stack.
2025-05-28 12:13:34 +01:00
Alex Orlenko
76a8f8cc71
Add __type to Error's userdata metatable.
...
Close #585
2025-05-27 01:31:54 +01:00
Alex Orlenko
13395e9c3d
Sync mlua_derive with AsChunk trait
2025-05-27 00:54:24 +01:00
Alex Orlenko
c61219dd93
Update Luau Require trait (sync with 0.674)
2025-05-27 00:12:45 +01:00