Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-09-28 | Make `protect_lua` as a smart macro to choose from C/closure | Alex Orlenko | |
2021-09-28 | Perf optimization: refactor metatable cache | Alex Orlenko | |
2021-09-15 | Add `DeserializeOptions` struct to control deserializer behavior. | Alex Orlenko | |
This solves #74 and provides a way to deserialize a Lua globals table. | |||
2021-08-21 | Wrap `ExtraData` to `Arc<UnsafeCell>>` instead of raw pointer and attach ↵ | Alex Orlenko | |
finalizer. This would allow to properly deallocate memory in module mode when closing lua state. | |||
2021-08-19 | Change `ExtraData::mem_info` to `Box<MemoryInfo>` | Alex Orlenko | |
2021-08-18 | Simplify interface of `hook::HookTriggers` | Alex Orlenko | |
2021-08-17 | Clarify about calling `Lua::init_from_ptr()` multiple times | Alex Orlenko | |
2021-07-13 | Shrink unsafe block in `Lua::load_from_function` and update doc | Alex Orlenko | |
2021-07-11 | UserData improvements: | Alex Orlenko | |
1) Optimize `make_userdata` call 2) Refactor `UserDataWrapped` and make it enum | |||
2021-07-09 | Forgotten optimization for `box_method_mut` | Alex Orlenko | |
2021-07-09 | Combine WrappedError and WrappedPanic structs to WrappedFailure enum | Alex Orlenko | |
2021-07-08 | Rename init_gc_metatable_for and get_gc_metatable_for | Alex Orlenko | |
2021-07-08 | Minor fixes/compilation after revert | Alex Orlenko | |
2021-07-08 | Revert "Make `protect_lua` as a smart macro to choose from C/closure" | Alex Orlenko | |
This reverts commit 84fe5f7f761e5a9669ae00df3f6e48ef2814272c. | |||
2021-07-08 | Revert "Move away from metatable hashmap cache to direct keys" | Alex Orlenko | |
This reverts commit adbc9ccc9be5d24ff56275938aebb11529ec7399. | |||
2021-07-08 | Don't wrap ExtraData to Arc<Mutex> and use raw pointer instead. | Alex Orlenko | |
This causes serious performance issues and given that Lua is single threaded (not Sync) it's safe to use a raw pointer instead. | |||
2021-07-08 | Move away from metatable hashmap cache to direct keys | Alex Orlenko | |
2021-07-07 | Make `protect_lua` as a smart macro to choose from C/closure | Alex Orlenko | |
2021-07-05 | Add new functions: `lua.load_from_function()` and `lua.create_c_function()` | Alex Orlenko | |
This should be useful to register embedded C modules to Lua state. Provides a solution for #61 | |||
2021-06-30 | Optimize callback creation | Alex Orlenko | |
Attach only one upvalue to callbacks rather than two. This leads to less lookup to Lua registry. | |||
2021-06-21 | Update `AsChunk::env` function prototype | Alex Orlenko | |
2021-06-20 | Even better optimization after 14d5c2c887 | Alex Orlenko | |
2021-06-20 | Optimize non-wrapped userdata method calls | Alex Orlenko | |
2021-06-20 | Lua->Rust callback performance improvements | Alex Orlenko | |
2021-06-18 | Fix userdata memleak in edge case. | Alex Orlenko | |
This can happen if we unable to push metatable with `__gc` metamethod after pushing userdata. In this case Lua will never execute drop. Instead, we will push metatable first and then userdata. | |||
2021-06-17 | Improve code coverage | Alex Orlenko | |
2021-06-16 | Revert commit ced808d5ab | Alex Orlenko | |
I think this experiment is unsuccessful and does not work well in a module mode with dynamic symbols resolution and mixing between different mlua instances. Overall the Rust bug has been fixed and we can wait for the "C-unwind" feature become stable. | |||
2021-06-13 | Check stack in entrypoint1 before pushing value to a stack | Alex Orlenko | |
2021-06-13 | Improve module mode: | Alex Orlenko | |
- Don't hide module function inside `luaopen_%` function. - Raise Lua exception instead of panic if module function returns error. | |||
2021-06-12 | Keep all Lua symbols in unsafe mode to load C modules | Alex Orlenko | |
2021-06-03 | Remove `T: Clone` requirement from `add_async_function` | Alex Orlenko | |
2021-06-03 | Implement `UserData` for Rc<RefCell>/Arc<Mutex>/Arc<RwLock> wrappers | Alex Orlenko | |
2021-05-18 | Allow multiple entrypoints in a single module share the same Lua state. | Alex Orlenko | |
Previously it would initialize different Lua instances. Fixes #49. | |||
2021-05-10 | Fix spelling | Alex Orlenko | |
2021-05-05 | Add chunk! macro support | Alex Orlenko | |
2021-05-05 | Update lua state when polling futures | Alex Orlenko | |
2021-05-03 | Update code docs | Alex Orlenko | |
2021-05-03 | Add `LuaOptions` to customize Lua/Rust behaviour. | Alex Orlenko | |
The only option is `catch_rust_panics` to optionally disable catching Rust panics via pcall/xpcall. | |||
2021-05-03 | Implement/Derive `Debug` for Lua and few other structs | Alex Orlenko | |
2021-05-03 | Store `safe` property in Extra state to inherit into Lua structs made from ↵ | Alex Orlenko | |
pointers | |||
2021-05-02 | Improve growing the auxiliary stack of the ref thread: | Alex Orlenko | |
Try to double size first, if not fulfilled try halving in a loop till 0. Fix unwinding after panic in ref_stack_pop. Add test to check the stack exhaustion. | |||
2021-05-02 | Allocate Waker slot in Registry in re-use it (instead of creating new ↵ | Alex Orlenko | |
userdata for it) | |||
2021-05-02 | Make AsyncPollPending internal value as LightUserData | Alex Orlenko | |
2021-05-02 | Stack assertions review | Alex Orlenko | |
Other minor code and documentation updates | |||
2021-04-27 | Refactor UserDataCell | Alex Orlenko | |
2021-04-27 | Add more checks for destructed userdata in AnyUserData | Alex Orlenko | |
2021-04-27 | Don't trigger longjmp in rust. | Alex Orlenko | |
Motivation behind this change is upcoming breaking change in Rust compiler v1.52.0 to prevent unwinding across FFI boundaries. https://github.com/rust-lang/rust/pull/76570 The new functionality requires nightly compiler to declare FFI functions as "C-unwind". The fundamental solution is to use C shim to wrap "e" and "m" Lua functions in pcall. Additionally define Rust calling convention to trigger lua_error on Rust behalf. | |||
2021-04-27 | Fix some clippy warnings & minor changes | Alex Orlenko | |
2021-04-27 | Add `UserDataFields` API. | Alex Orlenko | |
Provide safe access to UserData metatable and allow to define custom metamethods.. | |||
2021-04-16 | Serialize only known (registered) userdata. | Alex Orlenko | |
This reverts commit 7332c6a. Non-static userdata is a special case and can cause segfault if try to serialize it. Now it should be safe, plus I added non-static userdata destructor to generate better error messages in case of accessing destructed userdata. |