Alex Orlenko
f2b5cc44de
traits module no longer need to be public
...
The LuaNativeFn traits were moved to the `function` module and all other traits
as re-exported.
2026-04-18 16:09:17 +01:00
Alex Orlenko
27f91dfd1b
Accept any error in Function::wrap/wrap_mut/wrap_async
...
Previously wrapped functions were required to return `mlua::Result`.
Now it's possible to wrap functions returning any errors as long as
they implement `std::error::Error`.
Existing code remains compatible with `mlua::Result` as this type
is not converted to an external error.
2026-04-18 16:01:35 +01:00
Alex Orlenko
75ff11f795
Move LuaNativeFn/Mut into function module
2026-04-18 14:56:24 +01:00
Alex Orlenko
df6097ab38
Mark Luau CompileConstant as non_exhaustive
2026-04-18 14:51:54 +01:00
Alex Orlenko
65bb6279ee
Update serde types visibility
2026-04-18 14:47:26 +01:00
Alex Orlenko
31b88e85bb
cargo fmt
2026-04-18 13:26:42 +01:00
Alex Orlenko
3be4745190
Add initial Luau integer64 type support
...
RFC: https://rfcs.luau.org/type-long-integer.html
Unfortunately this type is not backward compatible with regular numbers
and require a special "integer" library.
It's not integrated with `Value` enum to keep it simple.
2026-04-18 13:14:05 +01:00
Alex Orlenko
c52deec988
Use c_int for userdata metatable id
2026-04-18 13:14:05 +01:00
三咲雅 misaki masa
3ab3c997b3
feat: support external strings for Cow<str> and Cow<CStr> ( #692 )
2026-04-09 10:45:15 +01:00
Alex Orlenko
5872ed70f5
Make traits module public
2026-04-04 15:04:00 +01:00
Alex Orlenko
e7e92b4f6f
Make chunk module public
2026-04-03 13:58:05 +01:00
Alex Orlenko
d27693b61a
Make error module public
2026-03-29 10:26:45 +01:00
Alex Orlenko
c9848d6faf
Update doc/example for (hidden) Lua::exec_raw_lua
2026-03-28 23:57:35 +00:00
Alex Orlenko
9126bb8ce0
Add RawLua::pop method
2026-03-28 22:37:25 +00:00
Alex Orlenko
7f1d716a44
Remove deprecated Lua::load_from_function
2026-03-28 17:40:22 +00:00
Alex Orlenko
be56e2205c
Update GC step_size doc
2026-03-28 17:38:49 +00:00
Alex Orlenko
c5aadc68cd
Open UserDataMethods::add_method_once and UserDataMethods::add_async_method_once
2026-03-28 17:17:57 +00:00
Alex Orlenko
a5ae2a1fc3
Update useratom doc
2026-03-28 17:07:03 +00:00
Alex Orlenko
59872da63d
mlua-sys: Bump lua-src and luajit-src dependencies
2026-03-28 16:31:19 +00:00
Alex Orlenko
a24d2151af
Minor fixes in docs
2026-03-27 22:54:56 +00:00
Alex Orlenko
56c227fd7e
Make state module public
2026-03-08 00:06:18 +00:00
Alex Orlenko
d5d66abe42
Refactor GC control API
...
- Replace `gc_inc/gc_gen` with `gc_set_mode`
- Add `GcIncParams` and `GcGenParams` for GC tuning
- Remove `gc_step_kbytes` (it's very rare needed and Lua 5.5 has changed the input param from kbytes to bytes)
2026-03-07 23:52:10 +00:00
Alex Orlenko
a2d8b21964
Make luau module public
2026-03-01 16:40:19 +00:00
Alex Orlenko
a9604c4946
Rename Luau's TextRequirer to FsRequirer
2026-03-01 16:27:41 +00:00
Alex Orlenko
81ae8e1393
Make Chunk::wrap public
2026-03-01 16:17:11 +00:00
Alex Orlenko
a959b98d30
Add chunk module doc and update prelude re-exports
2026-03-01 16:11:38 +00:00
Alex Orlenko
efd0856033
Derive PartialEq for Thread
2026-02-28 14:52:59 +00:00
Alex Orlenko
c91066006f
Make thread module public
2026-02-28 14:44:50 +00:00
Alex Orlenko
a45fe9bb93
Bump luau-src to 0.19 (Luau 0.710)
2026-02-28 12:03:37 +00:00
Alex Orlenko
f1a97e4193
Open Thread::state() that returns *mut lua_State pointer.
2026-02-28 11:48:59 +00:00
Alex Orlenko
47e6a37323
Add shortcuts to check thread status (Thread::is_resumable(), Thread::is_finished() etc)
2026-02-28 11:46:05 +00:00
Alex Orlenko
bf0c96908f
Remove lifetime from BorrowedStr and BorrowedBytes
...
The underlying `ValueRef` is cheap to clone as only increases reference count,
instead of allocating a new Lua stack slot.
2026-02-23 10:24:31 +00:00
Alex Orlenko
8817720362
Re-export (hidden) TablePairs and TableSequence
2026-02-23 09:51:24 +00:00
Alex Orlenko
35294359ad
Inline doc for some types
2026-02-22 19:58:28 +00:00
Alex Orlenko
eb76db59da
Make userdata module public
2026-02-22 19:52:57 +00:00
Alex Orlenko
33bf3ffde7
Fix doc warnings
2026-02-22 14:37:23 +00:00
Alex Orlenko
0f3fdb0539
Make string module public
2026-02-22 14:33:38 +00:00
Alex Orlenko
79d438aaad
Build CI docs on main branch
2026-02-22 13:28:48 +00:00
Alex Orlenko
30cf4bef58
Use RwLock directly instead of UserDataCell
2026-02-22 00:13:19 +00:00
Alex Orlenko
5776c72208
Use parking_lot::RwLock in UserDataCell container in "send" mode.
...
In non-send mode, mimic the `RwLock` API (using `Cell<isize>` counter).
We're continue manually operating the underlying `RawRwLock` for flexibility.
2026-02-21 23:18:39 +00:00
Alex Orlenko
943c3aed58
Some minor fixes in userdata cell
2026-02-21 21:19:42 +00:00
Alex Orlenko
8fcb6a8416
Update dependencies
2026-02-21 15:38:00 +00:00
Alex Orlenko
452dc8be88
clippy
2026-02-21 15:31:48 +00:00
Alex Orlenko
63a255bbc9
Replace is_sync specialization trick with MaybeSync trait bound.
...
The `is_sync::<T>()` runtime check relied on implicit specialization via
`Copy`/`Clone` array behavior, which has changed in Rust 1.86+.
`UserDataRef` always taking an exclusive lock even for `Sync` userdata,
preventing concurrent shared borrows.
With the `send` feature flag enabled, userdata types must now be `Send + Sync`.
This is a breaking change, `T: Send + !Sync` userdata types can be wrapped in a `Mutex`
or used inside a `Scope` where this restriction is lifted.
2026-02-21 15:05:55 +00:00
Alex Orlenko
151adc0e87
Implement pretty debug format for AnyUserData similar to Value::UserData.
2026-02-20 20:31:29 +00:00
Alex Orlenko
7f3ec63ab5
Support __todebugstring for pretty userdata debug output
...
Close #681
2026-02-20 18:59:53 +00:00
Alex Orlenko
f19c6aac3b
Fix tests
2026-02-12 16:20:51 +00:00
Alex Orlenko
29af448ad9
Update README to indicate dev status
2026-02-12 15:28:32 +00:00
Alex Orlenko
497d84828a
Add CI to build dev docs
2026-02-03 22:40:29 +00:00
Alex Orlenko
0e489901a5
Update debug module
...
Move debug types from root to new new module.
2026-02-03 22:39:33 +00:00