summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2023-06-15Update `UserDataMethods::add_async_method()` functions to take `&T` as ↵Alex Orlenko
second argument instead of cloning `T`. New functions: `UserDataMethods::add_async_method_mut()`, `UserDataMethods::add_async_meta_method_mut()`.
2023-06-07Fix setting Luau version number in `_VERSION` env varAlex Orlenko
2023-06-07Add `UserDataFields::add_field()` method to add static fields to UserData.Alex Orlenko
Plus `UserDataFields::add_meta_field()` for static meta fields. Fix propagating fields to wrapped UserData types.
2023-06-04Don't keep poll function in environment globals when polling async functions.Alex Orlenko
This is redundant after deprecating scoped async. Closes #281
2023-06-03Support getting and setting environment for Lua functions.Alex Orlenko
Closes #218
2023-05-30Update `FunctionInfo` doc and interfaceAlex Orlenko
2023-05-29Refactor application data container.Alex Orlenko
Now it's allowed at the same time mutably and immutably borrow different types. Each value in the application data container is stored in it's own `RefCell` wrapper. Also added new function `Lua::try_set_app_data()`.
2023-05-28Include (known) userdata type to Value debug pretty-printAlex Orlenko
2023-05-27Add `Value::to_string()` method similar to `luaL_tolstring`.Alex Orlenko
It uses `__tostring` metamethod if set. Closes #279
2023-05-25Set `__name` field in userdata metatable if not providedAlex Orlenko
2023-05-21Update to Lua 5.4.6Alex Orlenko
2023-05-08- Allow downcasting error wrapped into `Error::WithContext`Alex Orlenko
- Overwrite error context when called multiple times
2023-05-06Add `Value::NULL` constantAlex Orlenko
2023-05-03Add `OwnedAnyUserData::take()`Alex Orlenko
2023-04-27Update compile testsAlex Orlenko
2023-04-26Add OwnedStringAlex Orlenko
2023-04-26Various improvements for owned types, including:Alex Orlenko
- tests - shortcuts for `OwnedFunction` and `OwnedAnyUserData`
2023-04-23Check for reference leak detection only in mlua integratin tests.Alex Orlenko
This is not necessary an error and should not be enforced by default. Fixes #268.
2023-04-14Remove unstable feature flag from Function::wrap/wrap_mut/wrap_asyncAlex Orlenko
2023-04-11Add pretty-print to the Debug formatting to Value to Table.Alex Orlenko
This would allow dumping any Lua variable in human readable form.
2023-04-10Allow deserializing Lua null into unit(`()`) or unit struct. See #264Alex Orlenko
2023-04-08Add `Thread::set_hook()` functionAlex Orlenko
2023-04-05Refactor `HookTriggers` (make it const)Alex Orlenko
2023-03-30Don't call error handler for memory errors in coroutinesAlex Orlenko
2023-03-26Support setting memory limit for Lua 5.1/JIT/LuauAlex Orlenko
Other versions already support this feature. Closes #119
2023-03-25Add &Lua to luau interrupt callback (fixes #197)Alex Orlenko
2023-03-19Add `Error::downcast_ref()` methodAlex Orlenko
2023-03-17Tests for the `ErrorContext` traitAlex Orlenko
2023-03-14Improve error reporting when calling Rust functions from Lua.Alex Orlenko
In particular new error type `Error::BadArgument` added to help identify bad argument position or name (eg `self` for userdata).
2023-03-12Update edition everywhereAlex Orlenko
2023-03-03Rename rust_module in tests to test_moduleAlex Orlenko
This causes warning during compilation
2023-02-26Add `UserDataRef` and `UserDataRefMut` types that implement `FromLua`Alex Orlenko
and can be used as accessors to underlying `AnyUserData` type.
2023-02-18Add `AnyUserDataExt` trait with auxiliary functions for `AnyUserData`Alex Orlenko
2023-02-12Drop `Lua::async_scope` as it's unsoundAlex Orlenko
2023-02-12Add create_userdata_ref/create_userdata_ref_mut for scope (#206)Alex Orlenko
New methods would allow creating userdata objects from (mutable) reference to a UserData of registered type.
2023-02-03Allow registering and creating custom userdata types that don't necessary ↵Alex Orlenko
implement the `UserData` trait. This is useful to register 3rd party types that cannot implement `UserData` due to Rust orphan rules. See #206
2023-01-06Rename `to_lua_err` -> `into_lua_err`Alex Orlenko
2023-01-06Allow deserializing values from serializable UserData using ↵Alex Orlenko
`Lua::from_value()` method. Closes #240
2023-01-04Better Debug for StringAlex Orlenko
2023-01-02Add `Table::clear()` methodAlex Orlenko
2022-12-30Rename wrapped_failure/thread cache to poolAlex Orlenko
2022-12-24Refactor `userdata::MetaMethod`.Alex Orlenko
Take `impl AsRef<str>` as name of metamethod (instead of `Into<MetaMethod>`) in UserDataMethods/UserDataFields. Change position of generic args in userdata.
2022-12-22Add `Function::wrap`/`Function::wrap_mut`/`Function::wrap_async` to wrap ↵Alex Orlenko
functions into a type that implements `IntoLua` trait. This is useful to avoid calling `lua.create_function*` every time when `Function` handle is needed.
2022-12-21Fix module testsAlex Orlenko
2022-12-20Remove FromLua impl for UserData+CloneAlex Orlenko
2022-12-19Refactor `AsChunk` traitAlex Orlenko
2022-12-18Check for invalid args when parsing `#[lua_module(...)]` proc macroAlex Orlenko
2022-12-18feat: Support custom name of `lua_module`rise0chen
2022-12-18Use `impl AsRef<str>` for userdata methods/fields instead of generic param.Alex Orlenko
Use `impl AsRef<str>` for module names and named registry values.
2022-12-18Do not clear usevalues when taking value out of userdata.Alex Orlenko
It has big performance penalty. Lua GC can collect uservalues when userdata is not referenced anymore.