Commit Graph

  • 2efc637ab9 Move util into mod and add short_type_name function Alex Orlenko 2023-05-25 10:23:52 +01:00
  • 22e748557c Add new feature flag luau-jit to enable experimental Luau codegen backend Alex Orlenko 2023-05-24 19:04:38 +01:00
  • 77effb5055 Refactor callback_error_ext Also it makes rust-analyzer happy Alex Orlenko 2023-05-24 00:45:33 +01:00
  • 1c66a02878 Update to Lua 5.4.6 Alex Orlenko 2023-05-21 00:49:35 +01:00
  • 15e353a7f8 v0.8.9 v0.8.9 Alex Orlenko 2023-05-16 22:59:45 +01:00
  • 765117c2bb Update tarpaulin settings Alex Orlenko 2023-04-12 00:34:26 +01:00
  • 573d71345f Don't set html_root_url (it's not recommended) Alex Orlenko 2023-05-16 22:55:29 +01:00
  • 72de17bf47 Allow deserializing Lua null into unit(()) or unit struct. See #264 Alex Orlenko 2023-04-10 01:49:51 +01:00
  • 5a96e80266 Use lua_closethread instead of lua_resetthread in vendored mode (introduced in Lua 5.4.6) Alex Orlenko 2023-05-16 22:50:46 +01:00
  • bfdb4087b8 Update minimal (vendored) Lua 5.4 to 5.4.6 Alex Orlenko 2023-05-16 22:49:49 +01:00
  • eb84284824 Fix ref_stack_exhaustion test (Lua 5.4.6) Alex Orlenko 2023-05-16 22:12:36 +01:00
  • 1ac98e7d16 - Allow downcasting error wrapped into Error::WithContext - Overwrite error context when called multiple times Alex Orlenko 2023-05-08 23:39:53 +01:00
  • bbd2fe06e1 Use DeserializeOwned and remove lifetime from LuaSerdeExt trait Alex Orlenko 2023-05-06 23:07:22 +01:00
  • d951cb503f Add Value::NULL constant Alex Orlenko 2023-05-06 22:53:40 +01:00
  • bbd2488f79 Add OwnedAnyUserData::take() Alex Orlenko 2023-05-03 23:29:33 +01:00
  • 3253ae8f4a v0.9.0-beta.2 v0.9.0-beta.2 Alex Orlenko 2023-04-27 23:13:32 +01:00
  • fdda0d3724 Update compile tests Alex Orlenko 2023-04-27 23:06:38 +01:00
  • a1d385c7b7 Add OwnedString Alex Orlenko 2023-04-26 23:17:27 +01:00
  • 21b834decc Update coverage calculation (exclude mlua-sys) Alex Orlenko 2023-04-26 19:32:14 +01:00
  • 4daa7de997 Various improvements for owned types, including: - tests - shortcuts for OwnedFunction and OwnedAnyUserData Alex Orlenko 2023-04-26 15:34:15 +01:00
  • bd68a155c0 Replace ManuallyDrop with MaybeUninit Alex Orlenko 2023-04-25 11:48:50 +01:00
  • 993aaf44c7 mlua-sys: v0.1.1 Alex Orlenko 2023-04-24 11:25:22 +01:00
  • 54cbc62727 mlua-sys: use luau-src v0.5.6+luau573 Alex Orlenko 2023-04-24 11:24:32 +01:00
  • 2d6a0fdf9c Check for reference leak detection only in mlua integratin tests. This is not necessary an error and should not be enforced by default. Fixes #268. Alex Orlenko 2023-04-23 10:03:16 +01:00
  • d0cbd32ad2 (clippy) mlua_derive: don't clone function name Alex Orlenko 2023-04-22 11:07:24 +01:00
  • be64706cff Missing doc for OwnedAnyUserData Alex Orlenko 2023-04-14 10:29:34 +01:00
  • c178bc0a55 cargo fmt Alex Orlenko 2023-04-14 10:29:12 +01:00
  • 0fccdfed5c Fix feature flags for owned types Alex Orlenko 2023-04-14 01:09:50 +01:00
  • aaf0a5e44a Remove usage of crate::ffi (clippy) Alex Orlenko 2023-04-14 00:36:31 +01:00
  • 98888883bc mlua-sys: clippy Alex Orlenko 2023-04-14 00:31:06 +01:00
  • 65e72f39ae Remove unstable feature flag from Function::wrap/wrap_mut/wrap_async Alex Orlenko 2023-04-14 00:21:18 +01:00
  • f9d1213c4b Don't set html_root_url (it's not recommended) Alex Orlenko 2023-04-13 22:44:40 +01:00
  • dc10c80e61 Add documentation url to mlua-sys Alex Orlenko 2023-04-13 22:32:27 +01:00
  • 23b9cefdca Add missing doc_cfg feature to mlua-sys Alex Orlenko 2023-04-13 21:55:37 +01:00
  • 15dc0e9f23 Move ffi module into mlua-sys crate Alex Orlenko 2023-04-12 23:23:34 +01:00
  • 0c53e09e30 Update tarpaulin settings Alex Orlenko 2023-04-12 00:34:26 +01:00
  • cdbf04f50c Add pretty-print to the Debug formatting to Value to Table. This would allow dumping any Lua variable in human readable form. Alex Orlenko 2023-04-11 20:36:32 +01:00
  • ba324b4f54 Allow deserializing Lua null into unit(()) or unit struct. See #264 Alex Orlenko 2023-04-10 01:49:51 +01:00
  • 3e83753466 Add Thread::set_hook() function Alex Orlenko 2023-04-08 23:53:48 +01:00
  • 288934c82c Refactor HookTriggers (make it const) Alex Orlenko 2023-04-05 01:02:27 +01:00
  • 483bc80fc4 Add must_use to AsyncThread Alex Orlenko 2023-04-05 00:23:13 +01:00
  • 354c69acc4 Update README v0.9.0-beta.1 Alex Orlenko 2023-03-30 23:22:01 +01:00
  • 6fa0a78ec0 Prepare v0.9.0-beta.1 Alex Orlenko 2023-03-30 23:18:10 +01:00
  • f66932e8d2 Revert "Rename Owned*::to_ref() to as_ref()" Alex Orlenko 2023-03-30 22:35:43 +01:00
  • da6d5a93c9 Update rustyline dependency Alex Orlenko 2023-03-30 22:34:41 +01:00
  • 1be927bc5d Don't call error handler for memory errors in coroutines Alex Orlenko 2023-03-30 17:29:57 +01:00
  • 0848ddcdf7 Clippy Alex Orlenko 2023-03-28 20:53:22 +01:00
  • e182d474e0 More user-friendly error message about missing value for name attribute in module macro Update the [lua_module] doc Alex Orlenko 2023-03-28 14:41:21 +01:00
  • 0f937b0a03 Switch to syn 2.0 Alex Orlenko 2023-03-28 13:56:59 +01:00
  • cd9fc1d08f Update Error doc Alex Orlenko 2023-03-26 20:58:43 +01:00
  • d9aac08b81 Support setting memory limit for Lua 5.1/JIT/Luau Other versions already support this feature. Closes #119 Alex Orlenko 2023-03-26 00:02:35 +00:00
  • 9c1669020b Clippy Alex Orlenko 2023-03-25 23:38:57 +00:00
  • 742307a267 Add &Lua to luau interrupt callback (fixes #197) Alex Orlenko 2023-03-25 16:30:31 +00:00
  • 781ded573a Seal LuaSerdeExt/TableExt/AnyUserDataExt Alex Orlenko 2023-03-19 02:38:21 +00:00
  • 6a647f58be Add Error::downcast_ref() method Alex Orlenko 2023-03-19 00:22:51 +00:00
  • 4bc6501d2e Tests for the ErrorContext trait Alex Orlenko 2023-03-17 01:31:07 +00:00
  • 8d80321738 Add ErrorContext extension trait to attach additional context to Error Alex Orlenko 2023-03-17 01:20:57 +00:00
  • a0d37fd182 Rename error to cause in Error::BadArgument Alex Orlenko 2023-03-16 23:48:54 +00:00
  • 03787668fd Improve error reporting when calling Rust functions from Lua. In particular new error type Error::BadArgument added to help identify bad argument position or name (eg self for userdata). Alex Orlenko 2023-03-14 23:23:46 +00:00
  • 3059f82552 Update README and CHANGELOG Alex Orlenko 2023-03-12 23:51:37 +00:00
  • 22fbcfd9fb Update edition everywhere Alex Orlenko 2023-03-12 01:03:31 +00:00
  • 304880bfd1 Fast metatable check for Lua::push_userdata_ref Alex Orlenko 2023-03-10 09:59:22 +00:00
  • 34679e105d v0.8.8 v0.8.8 Alex Orlenko 2023-03-05 17:50:53 +00:00
  • bc194981fc Optimize userdata methods call when __index and fields_getters are nil Alex Orlenko 2023-03-04 11:58:34 +00:00
  • c9715aa5d9 Fix potential deadlock when trying to reuse dropped RegistryKey. If no free registry id found, we call protect_lua! macro while keeping mutex guard to the unref list. Protected calls can trigger garbage collection and if RegistryKey is placed in userdata being collected, this can lead to deadlock. The solution is drop mutex guard as soon as possible. Also this commit includes optimization in creating reference in Lua registry. Alex Orlenko 2023-02-22 20:15:40 +00:00
  • c108dc8213 Force protected mode for long enough strings Alex Orlenko 2023-02-06 23:46:31 +00:00
  • 33c276d0b4 Optimize userdata methods call when __index and fields_getters are nil Alex Orlenko 2023-03-04 11:58:34 +00:00
  • 87d027e8ac Rename rust_module in tests to test_module This causes warning during compilation Alex Orlenko 2023-03-03 18:58:13 +00:00
  • d7db1b7f2e Add Waker lifetime to WakerGuard Alex Orlenko 2023-03-03 18:29:04 +00:00
  • 22c973af02 Async: Don't clone function when executing it from recycled thread Alex Orlenko 2023-03-03 18:22:30 +00:00
  • 8c18fa1764 Async: store pointer to Waker in extra data rather than in Lua ref thread Alex Orlenko 2023-03-03 15:19:54 +00:00
  • 5394faca16 Rename Owned*::to_ref() to as_ref() Alex Orlenko 2023-03-02 15:36:11 +00:00
  • 4a3f6d60ad Update exports in libs and prelude Alex Orlenko 2023-03-02 15:34:42 +00:00
  • 68b60e2a0a Add UserDataRef and UserDataRefMut types that implement FromLua and can be used as accessors to underlying AnyUserData type. Alex Orlenko 2023-02-26 21:52:28 +00:00
  • 888bd77e60 Add AnyUserDataExt to prelude Alex Orlenko 2023-02-25 23:59:29 +00:00
  • 949906f9f7 Fix potential deadlock when trying to reuse dropped RegistryKey. If no free registry id found, we call protect_lua! macro while keeping mutex guard to the unref list. Protected calls can trigger garbage collection and if RegistryKey is placed in userdata being collected, this can lead to deadlock. The solution is drop mutex guard as soon as possible. Also this commit includes optimization in creating reference in Lua registry. Alex Orlenko 2023-02-22 20:15:40 +00:00
  • 94f01e597c Add AnyUserDataExt trait with auxiliary functions for AnyUserData Alex Orlenko 2023-02-18 23:40:28 +00:00
  • b8e3290f35 Update LuaRef/LuaOwnedRef Move content of Lua::make_owned_ref into LuaRef::into_owned Add crate-visible Lua::clone function (not trait) Alex Orlenko 2023-02-15 09:20:03 +00:00
  • 03ab828342 Return evicted value to Lua::set_app_data if it's already present. Add "Panics" section to Lua::*_app_data docs. Alex Orlenko 2023-02-12 23:34:21 +00:00
  • b66bff9155 Drop Lua::async_scope as it's unsound Alex Orlenko 2023-02-12 22:25:10 +00:00
  • f52abf919e Add create_userdata_ref/create_userdata_ref_mut for scope (#206) New methods would allow creating userdata objects from (mutable) reference to a UserData of registered type. Alex Orlenko 2023-02-11 21:58:43 +00:00
  • b790b525c1 Fix clippy warnings Alex Orlenko 2023-02-07 22:43:48 +00:00
  • f5182e0584 Force protected mode for long enough strings Alex Orlenko 2023-02-06 23:46:31 +00:00
  • 47c8300ccf Allow registering and creating custom userdata types that don't necessary implement the UserData trait. This is useful to register 3rd party types that cannot implement UserData due to Rust orphan rules. See #206 Alex Orlenko 2023-02-03 23:46:04 +00:00
  • 8339621f9c Rename to_lua_err -> into_lua_err Alex Orlenko 2023-01-06 21:35:15 +00:00
  • 16cbb442e5 Fix clippy warnings Alex Orlenko 2023-01-06 20:50:29 +00:00
  • 88da28a68d Allow deserializing values from serializable UserData using Lua::from_value() method. Closes #240 Alex Orlenko 2023-01-05 21:32:15 +00:00
  • a62061f453 Update README Alex Orlenko 2023-01-04 20:58:03 +00:00
  • e86ef9d755 v0.8.7 v0.8.7 Alex Orlenko 2023-01-04 16:15:23 +00:00
  • cb3d58b1c7 Better Debug for String Alex Orlenko 2023-01-04 15:56:57 +00:00
  • fa46720f5a Add Table::clear() method Alex Orlenko 2022-12-31 16:49:33 +00:00
  • 72b9209ae9 Rename wrapped_failure/thread cache to pool Alex Orlenko 2022-12-30 21:48:12 +00:00
  • 0cb7058476 Rename MultiValue cache to pool Alex Orlenko 2022-12-30 14:50:39 +00:00
  • ac8b3424d1 Update criterion Alex Orlenko 2022-12-30 13:45:59 +00:00
  • 2cb4b49d0d Don't use unstable features in examples Alex Orlenko 2022-12-30 13:39:27 +00:00
  • d67332a3ac Refactor userdata::MetaMethod. Take impl AsRef<str> as name of metamethod (instead of Into<MetaMethod>) in UserDataMethods/UserDataFields. Change position of generic args in userdata. Alex Orlenko 2022-12-24 19:16:58 +00:00
  • 22c6e9a7e7 Enable unstable feature flag in CI Alex Orlenko 2022-12-22 16:30:14 +00:00
  • 1d4a135e8e Add Function::wrap/Function::wrap_mut/Function::wrap_async to wrap functions into a type that implements IntoLua trait. This is useful to avoid calling lua.create_function* every time when Function handle is needed. Alex Orlenko 2022-12-22 16:24:35 +00:00
  • 9d28b790e7 Fix module tests Alex Orlenko 2022-12-21 21:05:23 +00:00
  • 61c285746c Remove FromLua impl for UserData+Clone Alex Orlenko 2022-12-19 23:05:17 +00:00