Commit Graph

1851 Commits

Author SHA1 Message Date
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
Alex Orlenko 88063e756f Make table module public 2026-01-30 13:18:46 +00:00
Alex Orlenko c8436e2b80 Make function module public
Reduce number of function-specific types exported to the mlua root and keep
them inside the module.
2026-01-30 13:18:05 +00:00
Alex Orlenko 613748ec16 Use Error::from_lua_conversion helper 2026-01-29 23:09:52 +00:00
Alex Orlenko 2fbd266da6 Remove Error::ToLuaConversionError
This variant used only once and not practically useful.
2026-01-29 23:04:30 +00:00
Alex Orlenko c79b5e9cdb cargo fmt 2026-01-29 23:03:56 +00:00
Alex Orlenko 2ace892613 Rename string::String to LuaString 2026-01-29 18:45:41 +00:00
Alex Orlenko c1ffd4e790 Replace get_or_insert_with with get_or_insert_default 2026-01-29 10:46:58 +00:00
Alex Orlenko d9c139b55f Rust 2024 2026-01-29 10:33:28 +00:00
Alex Orlenko 0c4206c97d Bump min Rust version to 1.88 2026-01-29 10:13:04 +00:00
Alex Orlenko a985dc7a37 Start 0.12.0-dev.1 2026-01-29 10:07:05 +00:00
Alex Orlenko e7fa8d75bb v0.11.6 v0.11.6 2026-01-27 16:06:24 +00:00
Alex Orlenko c10718ed2f Update CHANGELOG 2026-01-27 16:04:33 +00:00
Alex Orlenko ec2ce3620f Some final Lua 5.5 updates 2026-01-27 16:00:49 +00:00
Alex Orlenko 71757003c7 mlua-sys: v0.10.0 2026-01-27 15:56:53 +00:00
Alex Orlenko 6bb7f09927 Don't use luaL_typename to get a static type name in Luau.
In Luau this function returns heap-allocated string rather than static string,
so accessing this value when Lua state is destroyed is UB.
Fixes #674
2026-01-27 14:10:43 +00:00
Alex Orlenko e67ae7f0de Make RawLua::{push,push_value,pop_value} public 2026-01-27 12:17:58 +00:00
Alex Orlenko 8c1535c27b cargo fmt 2026-01-27 12:14:50 +00:00
WASDetchan fd245daa6f Expose RawLua via Lua::exec_raw_lua (#670) 2026-01-23 16:19:10 +00:00
Alex Orlenko 7fb7e8685f Update spelling check 2026-01-23 15:37:18 +00:00
Alex Orlenko 93617eef4e Update trybuild (compile) messages 2026-01-23 15:16:35 +00:00
Alex Orlenko 171cdf1758 Some fixes and more tests for Function::info 2026-01-23 12:44:22 +00:00
psentee 3f8f016daa Add num_params, is_vararg, nups to FunctionInfo (#665) 2026-01-23 11:59:59 +00:00
Alex Orlenko 86d0c9bddb More multi borrow "send" test fixes due to regression in Rust 1.93+ 2026-01-22 23:08:17 +00:00
Alex Orlenko 86d63ef27b Fix missing BUFSIZ for wasm32 in libc 2026-01-22 15:46:31 +00:00
Alex Orlenko e33bcf7938 Add Lua 5.5 external string null byte test 2026-01-22 15:32:14 +00:00
Alex Orlenko c80a97b526 Ignore userdata_multithread_access_sync test 2026-01-22 15:25:18 +00:00
Alex Orlenko 3c40cfe199 mlua-sys: Use 2024 edition 2026-01-22 14:09:14 +00:00
Alex Orlenko e9efb73125 Update Luau FFI bindings (added some missing functions) 2026-01-22 14:05:57 +00:00
Alex Orlenko 386c6d8ed8 Update Lua 5.5 FFI bindings (add buffer manipulation, etc) 2026-01-22 12:54:55 +00:00
Alex Orlenko 8f086bf837 Update Lua 5.4 FFI bindings (add buffer manipulation, etc) 2026-01-22 12:50:56 +00:00
Alex Orlenko ad167612dc Update Lua 5.3 FFI bindings (add buffer manipulation, etc) 2026-01-20 15:36:36 +00:00
Alex Orlenko 3366f47d40 Minor Lua 5.2 fixes 2026-01-20 15:28:33 +00:00
Alex Orlenko 0b5ef91f44 Update Lua 5.2 FFI bindings (add buffer manipulation, etc) 2026-01-20 14:29:35 +00:00
Alex Orlenko a162b0ceca Update Lua 5.1 FFI bindings (add buffer manipulation, etc) 2026-01-20 14:29:15 +00:00