1720 Commits

Author SHA1 Message Date
Alex Orlenko 928d94d255 v0.11.0 v0.11.0 2025-07-14 15:33:02 +01:00
Alex Orlenko 583c35a172 Prepare for v0.11.0 2025-07-12 22:47:20 +01:00
Alex Orlenko 1791c599f4 mlua-sys: v0.8.2 2025-07-12 22:46:37 +01:00
Alex Orlenko 1e48817a64 Fix deregistering previously-registered userdata 2025-07-12 19:20:15 +01:00
Alex Orlenko 8d219503dd Opt-out from R: MaybeSend in AsyncThread<R> 2025-07-12 15:34:04 +01:00
Alex Orlenko 95367855c1 Return AsyncCallFuture<R> instead of opaque impl Future from ObjectLike trait. 2025-07-12 15:30:58 +01:00
Alex Orlenko 49389c4aa4 Wrap Function::coverage callback to RefCell (Luau) 2025-07-12 13:34:39 +01:00
Alex Orlenko 13dc2b5352 Don't release Lua lock prematurely when when accessing Buffer bytes (Luau) 2025-07-12 13:08:33 +01:00
Alex Orlenko 7afbf74128 Add MaybeSend bound to async methods on ObjectLike trait (sealed) 2025-07-12 12:45:36 +01:00
Alex Orlenko 06c3bd9d69 Fix serde README section (close #613) 2025-07-12 11:50:11 +01:00
Alex Orlenko 1ddaea60ce Bump luau-src to 0.15.4+luau682 2025-07-12 11:27:41 +01:00
Alex Orlenko a653d08768 Simplify Compiler::add_library_constant (combine lib and member) 2025-07-09 00:11:46 +01:00
Alex Orlenko 2b6b0144a1 Merge Compiler::set_vector_lib into set_vector_ctor 2025-07-08 23:55:45 +01:00
Alex Orlenko 4cfe0be945 Update CHANGELOG 2025-07-08 23:22:18 +01:00
Alex Orlenko a9a4814c3c Use StdString for consistency in chunk.rs 2025-07-08 22:25:23 +01:00
Alex Orlenko b1f73ec29d Update Luau Compiler methods to better control extra options:
- Add `add_mutable_global`
- Add `add_userdata_type`
- Replace `set_library_constants` with `add_library_constant`
- Add `add_disabled_builtin`
2025-07-08 22:22:44 +01:00
Alex Orlenko 61a2141151 Don't panic when fourth library searcher does not exists.
When disabling C modules, we remove the last two searchers (C & C all-in-one).
In Pluto the C searches may not exist by design, in this case check that 4th searcher is present before removing it.
Closes #530
2025-07-08 13:37:48 +01:00
Alex Orlenko dea38f27a5 Change !cfg!(..) to cfg!(not(..)) for better readability 2025-07-08 10:42:15 +01:00
Sculas 04aaa18dc8 feat: Allow external build scripts to link Lua libraries (#529)
Allow external build scripts to link Lua libraries
2025-07-08 10:30:26 +01:00
Alex Orlenko d8455c038a Update CHANGELOG 2025-07-08 10:12:03 +01:00
Alex Orlenko ca22ea3be7 Deprecate Debug::curr_line() in favour of Debug::current_line() that returns Option 2025-07-08 10:09:26 +01:00
Alex Orlenko cf05593d66 Fix Debug::is_tail_call 2025-07-08 10:05:37 +01:00
Alex Orlenko d011a1f851 Update CHANGELOG 2025-07-07 23:15:46 +01:00
Alex Orlenko 1ec4661bf9 mlua_derive: v0.11.0 2025-07-07 22:58:41 +01:00
Alex Orlenko d3b2999d2f Remove MaybeSend requirement from Require trait and add to Lua::create_require_function instead 2025-07-07 22:58:24 +01:00
Alex Orlenko 72f6536efb Check table requested capacity limits before enabling unprotected mode.
Lua tables have limits and can overflow, which must be captured in protected mode.
2025-07-07 22:57:30 +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 1882931cd9 Optimize Table::metatable 2025-07-06 10:57:26 +01:00
Alex Orlenko c90cac5189 Add Lua::set_globals method to replace global environment.
Closes #611
2025-07-06 10:57:25 +01:00
Alex Orlenko c0d839d8d2 Make Thread::state pub (hidden) 2025-07-05 22:36:47 +01:00
Alex Orlenko 80471c6dad Optimize AnyUserData::metatable 2025-07-05 11:33:11 +01:00
Alex Orlenko 4b9d1cf271 Replace impl ToString with Into<StdString>
This is a more canonical way to accept any types of stirng but not arbitrary types that implement `Display`
2025-07-05 11:21:18 +01:00
Alex Orlenko 55c07f3b28 Some minor changes in Luau TextRequirer (comments, naming, etc) 2025-07-03 14:42:24 +01:00
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