summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-01-06Rename `to_lua_err` -> `into_lua_err`Alex Orlenko
2023-01-06Fix clippy warningsAlex 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-30Rename MultiValue 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-20Remove FromLua impl for UserData+CloneAlex Orlenko
2022-12-19Rename ToLua/ToLuaMulti -> IntoLua/IntoLuaMultiAlex Orlenko
2022-12-19Add "unstable" feature flag.Alex Orlenko
Hide owned types under the new feature flag. Drop OwnedString/OwnedThread types (unlikely they are useful).
2022-12-19Refactor `AsChunk` traitAlex Orlenko
2022-12-19Refactor LuaInner stateAlex Orlenko
Add static_assertions to check for auto traits impl on compilation stage Bump MSRV to 1.63 (required for `Ref::filter_map`)
2022-12-18Add ?Sized to PartialEq for Lua StringAlex Orlenko
2022-12-18Replace `impl AsRef<str>` with simple `&str`Alex Orlenko
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.
2022-12-18Initial implementation of owned Lua typesAlex Orlenko
2022-12-15Fix subtraction overflow when calculating index for `MultiValue::get()`.Alex Orlenko
Return `None` instead of panic in debug mode. Fixes #232
2022-12-09Fix lifetime of `DebugNames` in `Debug::names()` and `DebugSource` in ↵Alex Orlenko
`Debug::source()`. This can cause use-after-free if used wrong. Now invalid code would not compile. Reported in #230
2022-12-03Redefine `_VERSION` for Luau to include version number.Alex Orlenko
https://github.com/khvzak/mlua/discussions/228
2022-12-03Update Luau to 0.555 (luau-src 0.5.0)Alex Orlenko
This version includes inreased LUAI_MAXCSTACK limit (100000)
2022-11-07v0.8.6Alex Orlenko
2022-11-07Fix bug when recycled Registry slot can be set to Nil.Alex Orlenko
This can result in allocating the same slot twice and rewriting old value. Lua uses (registry) table length to find next free slot and having Nil in the middle of the table can impact length calculation. With this fix we ensure that Nil values uses a special LUA_REFNIL slot.
2022-10-30v0.8.5Alex Orlenko
2022-10-30Better checks and tests when trying to modify a Luau readonly tableAlex Orlenko
2022-10-29Fix `Table::raw_push` for luau when readonlyAlex Orlenko
2022-10-28Fix getting caller information from Lua::loadAlex Orlenko
2022-10-23Add push/pop methods to TableAlex Orlenko
2022-10-23Minor serde optimizationsAlex Orlenko
2022-10-23Optimize `Lua::create_table` to use reference thread if possibleAlex Orlenko
2022-10-23Optimize `Lua::create_string` to use reference thread if possibleAlex Orlenko
2022-10-22Optimize tables:Alex Orlenko
- Use reference thread directly for simple cases - Fix issue when calling raw_set on readonly table (Luau) - Add fasttrack methods for get/set/len when metatable is not set
2022-10-22Strings optimizations: get access to bytes directly from ref thread.Alex Orlenko
2022-10-22Replace Lua::ref_thread_execAlex Orlenko
2022-10-22Update formatting (Lua registry values)Alex Orlenko
2022-10-22Check that allocation does not exceed isize::MAXAlex Orlenko
See https://github.com/rust-lang/rust/issues/101899
2022-10-09v0.8.4Alex Orlenko
2022-10-09Fix clippy warningsAlex Orlenko
2022-10-09Update push_userdata_refAlex Orlenko
2022-10-09Don't allocate extra byte for userdata (luau)Alex Orlenko
2022-10-08Update to Luau 0.548 (luau-src >=0.4)Alex Orlenko
2022-09-05Add luaL_setfuncs to preserved functionsAlex Orlenko
2022-08-23Check if chunk is empty in luaL_loadbufferx for Luau (fixes #200)Alex Orlenko
2022-08-23Fix typo in doc commentTrisha
2022-08-02v0.8.3Alex Orlenko
2022-08-02Fallback to Lua internal allocator if unable to create Lua VM with Rust one.Alex Orlenko
This should fix #194
2022-08-01Fix Lua assertion when inspecting another thread stack.Alex Orlenko
The thread can be dead and it's not safe to call __tostring metamethod (if present) on error object. Fixes #195
2022-08-01Check that Lua state is non-null in init_from_ptr()Alex Orlenko