Alex Orlenko
d0ea428e23
Add encode_empty_tables_as_array serialize option.
...
This will change the behaviour of encoding empty Lua tables into array instead of map.
2025-05-05 00:52:22 +01:00
Alex Orlenko
3e87d3ea9b
Optimize Table::is_empty
2025-05-05 00:52:14 +01:00
krakow10
0f8bde4b4e
Fix Reversed Comments & Typo ( #560 )
...
* Fix reversed comments
* Fix typos
2025-05-05 00:52:07 +01:00
Alex Orlenko
b9c9dfbd03
mlua-sys: Update Luau to 0.671
2025-05-05 00:51:38 +01:00
Alex Orlenko
71824297f6
mlua-sys: Add definitions for Luau require library (since 0.669)
2025-05-05 00:50:39 +01:00
Alex Orlenko
c0a8064228
Update references to mlua repo
2025-05-05 00:50:31 +01:00
Alex Orlenko
84efb8bf95
Fix warnings when testing documentation
2025-05-05 00:50:19 +01:00
Alex Orlenko
cf687a6ac6
Make Lua::weak() method and WeakLua struct public.
...
This can be useful to prevent circular dependencies between Rust and Lua
or check that Lua instance is still alive.
2025-05-05 00:50:12 +01:00
Alex Orlenko
ea85edb242
Update dependencies
2025-05-05 00:49:41 +01:00
Alex Orlenko
788175e0d6
Restrict access to Luau VM from UserData destructors.
...
It's unsafe to make almost any Lua calls when userdata destructor is running.
This can cause recursive GC run and crash.
See https://github.com/luau-lang/luau/pull/510 for some details.
2025-05-05 00:49:26 +01:00
Alex Orlenko
90ef25a6ee
Prepare for custom (Luau) userdata destructors.
...
We need to add logic later to prevent calling any Lua functions when UserData destructor is running.
2025-05-05 00:49:17 +01:00
Alex Orlenko
ac72f6acae
Do not propagate collect_garbage flag when clonning Lua
2025-05-05 00:47:39 +01:00
Alex Orlenko
4444ac4ea3
Add AnyUserData::type_id method
2025-05-05 00:47:09 +01:00
Alex Orlenko
5f950e30ec
Update Lua::poll_pending doc (still hidden)
2025-05-05 00:47:02 +01:00
Alex Orlenko
311aa5f6e1
Bump Luau to 0.667
2025-05-05 00:46:45 +01:00
Alex Orlenko
739d5f5262
Reduce stack operations when creating userdata
2025-05-05 00:46:28 +01:00
Alex Orlenko
375028e13f
Add Chunk::name(), Chunk::environment() and Chunk::mode() functions.
...
They can be used to retrieve existing chunk params.
2025-05-05 00:46:20 +01:00
Alex Orlenko
46e949c184
Use c string literal where appropriate
2025-05-05 00:44:05 +01:00
Alex Orlenko
62b53e218c
Move some userdata helpers from crate::util to crate::userdata::util
2025-05-05 00:43:12 +01:00
Alex Orlenko
0393406b9f
Refactor userdata-wrappers feature.
...
Support borrowing underlying data in `UserDataRef` and `UserDataRefMut`.
2025-05-04 18:45:42 +01:00
Alex Orlenko
272cfdb89b
Change Lua library name constants from &str to *const c_char.
...
It makes easier to pass them to Lua API functions.
2025-05-04 12:49:08 +01:00
Alex Orlenko
8e244a25ea
Update test case
2025-05-04 12:48:47 +01:00
Alex Orlenko
ef8b8e11ec
Support 52-bit integers for Luau
...
Simply to float conversion (it actually never fails or goes out of range)
2025-05-04 12:48:34 +01:00
Alex Orlenko
2543414726
Fix clippy warnings
2025-05-04 12:47:30 +01:00
Alex Orlenko
ee112568d6
Remove Roblox from references to Luau
...
Closes #537
2025-05-04 12:46:47 +01:00
Alex Orlenko
69d3ddec29
Remove (internal) borrow counter and use instead "locked" flag and strong reference counter
2025-05-04 12:46:35 +01:00
Alex Orlenko
5b0d811c5a
Add Variadic to prelude
2025-05-04 12:31:13 +01:00
Alex Orlenko
19536db976
Add bstr/serde dependency if serialize feature flag is enabled
2025-05-04 12:30:52 +01:00
Alex Orlenko
fc69551f87
Fix tests
2025-05-04 12:29:57 +01:00
Alex Orlenko
a68b0b6905
Do not allow recursive warnings (Lua 5.4)
2025-05-04 12:29:51 +01:00
Alex Orlenko
1ec1cc9922
Fix tests
2025-05-04 12:28:40 +01:00
Joel Natividad
fd68b033f0
Fix typos ( #522 )
...
* fix various typos in the codebase
* fix typos in CHANGELOG.md
2025-05-04 12:28:24 +01:00
Andrew Farkas
c3817409a8
Fix version number in changelog ( #521 )
2025-05-04 12:28:04 +01:00
Alex Orlenko
863d8092d6
Imporove BorrowedStr/BorrowedBytes ergonomic.
...
Implement `FromLua` and `IntoLua` for these types to allow working with them directly.
2025-05-04 12:27:24 +01:00
Alex Orlenko
24b6ff3c20
Improve From/Into Lua char conversion
2025-05-04 12:18:28 +01:00
tk
bc36261f5c
impl FromLua/IntoLua for char (#516 )
2025-05-04 12:18:22 +01:00
Alex Orlenko
bcb9a4d220
Enable Thread::reset() for all Lua versions
2025-05-04 12:07:55 +01:00
Alex Orlenko
9caf3542d9
v0.10.3
v0.10.3
2025-01-27 21:33:51 +00:00
Alex Orlenko
cb45db05fa
Update README/CHANGELOG
2025-01-27 21:33:24 +00:00
Alex Orlenko
d1cb2a9a96
mlua-sys: v0.6.7
2025-01-27 21:20:47 +00:00
Alex Orlenko
aa3f6ba46c
Fix prototype of new Luau compiler options and methods
2025-01-27 21:19:31 +00:00
Alex Orlenko
cc57bed4c8
Update Luau to 0.657
2025-01-27 14:19:40 +00:00
Radiant
b5d38ab2e3
Set Default for LuaValue to be nil. ( #512 )
2025-01-19 23:52:58 +00:00
Alex Orlenko
cd4091f64d
Allow exhaustive match on Value.
...
It was not possible because `ValueRef` variant in `Value::Other` was private.
Closes #502 and #503
2024-12-10 23:37:19 +00:00
Alex Orlenko
91e069a77e
Optimize (and simplify) protected mode for Rust function calls
2024-12-07 00:04:12 +00:00
Alex Orlenko
cacd3dc70f
Add Table::set_safeenv method (Luau)
2024-12-04 10:40:49 +00:00
Alex Orlenko
6f6cda0099
v0.10.2
v0.10.2
2024-12-01 13:04:06 +00:00
Alex Orlenko
d51ce86142
mlua-sys: v0.6.6
2024-12-01 12:56:39 +00:00
Alex Orlenko
aa061bce6f
mlua_derive: v0.10.1
2024-12-01 12:55:50 +00:00
Alex Orlenko
1c6b6ad801
Fix tests
2024-12-01 12:54:35 +00:00