summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2021-06-13Fix clippy warnings && testsAlex Orlenko
2021-06-13Improve 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-04Add `String::to_string_lossy`Alex Orlenko
2021-06-03Implement `UserData` for Rc<RefCell>/Arc<Mutex>/Arc<RwLock> wrappersAlex Orlenko
2021-05-18Allow multiple entrypoints in a single module share the same Lua state.Alex Orlenko
Previously it would initialize different Lua instances. Fixes #49.
2021-05-05Add chunk! macro supportAlex Orlenko
2021-05-05Add `Thread::reset()` for luajit/lua54Alex Orlenko
2021-05-03Make `SerializeOptions` non_exhaustive.Alex Orlenko
Add builder implementation similar to `LuaOptions` to set individual options.
2021-05-03Add `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-03Implement ToLua/FromLua for Box<str> and Box<[T]>Alex Orlenko
2021-05-02Improve 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-02Change signature of Function::dump() to remove ResultAlex Orlenko
2021-04-27Store nonstatic UserData pointer in self userdata (instead of metatable)Alex Orlenko
2021-04-27Remove Result from lua.null() and lua.array_metatable(). They never fail.Alex Orlenko
2021-04-27Add SerializeOptions to to change default Lua serializer behaviourAlex Orlenko
2021-04-27More testsAlex Orlenko
2021-04-27Add more checks for destructed userdata in AnyUserDataAlex Orlenko
2021-04-27Don'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-27Make MetaMethod::name() publicAlex Orlenko
Tests for UserDataMetatable::pairs()
2021-04-27Improve/fix scoped UserData dropAlex Orlenko
2021-04-27Add `UserDataFields` API.Alex Orlenko
Provide safe access to UserData metatable and allow to define custom metamethods..
2021-04-16Drop 'feature(link_args)' (removed from nightly). Don't run tests for LuaJIT ↵Alex Orlenko
2.0.5
2021-04-16Serialize 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.
2021-04-15Improve panic handling (check for twice resumed panics)Alex Orlenko
2021-03-03Fix compilation warnings on nightlyAlex Orlenko
2021-03-03Fix bug in returning nil-prefixed multi values from async functionAlex Orlenko
2021-02-21Fix scoped async destruction of partially polled futuresAlex Orlenko
2020-12-29Update compile testsAlex Orlenko
2020-12-22Don't try to disable c modules without `package` loaded. Fix #24Alex Orlenko
2020-12-14Serde support (serialize feature flag)Alex Orlenko
2020-11-04Update num-traits dependencyAlex Orlenko
Fix f32-to-f64 conversion tests
2020-10-27Update compile tests (temporary set TRYBUILD=overwrite)Alex Orlenko
2020-09-28Update compile tests error messagesAlex Orlenko
2020-07-28Add ChunkMode enum to mark chunks as text or binaryAlex Orlenko
2020-07-27Add Function::dump() to dump lua function to a binary chunkAlex Orlenko
2020-07-27Update compile tests (2)Alex Orlenko
2020-07-27Update compile testsAlex Orlenko
2020-06-07Enable hooks support for LuaJITAlex Orlenko
2020-06-07Fix LuaJIT 2.1 libraries loadingAlex Orlenko
2020-06-07Refactor main_state handlingAlex Orlenko
Don't allow to set hook if main_state is not available Remove Lua 5.1 dirty hack
2020-06-07Add test to check loading module from lua coroutine (thread)Alex Orlenko
2020-06-07New `module` featureAlex Orlenko
Don't link module with Lua core (see: http://lua-users.org/wiki/BuildingModules) Example and tests for modules
2020-06-06Add `has_metamethod` to `AnyUserData`Alex Orlenko
2020-06-06Add hooks support (based on rlua v0.17 implementation)Alex Orlenko
This feature works on lua54, lua53, lua52 and lua51 only. LuaJIT is unstable.
2020-06-06Add LuaJIT 2.0.5 stable supportAlex Orlenko
2020-05-12Update compile tests to include async/send featuresAlex Orlenko
2020-05-12Provide safe and unsafe Lua modes:Alex Orlenko
- In safe mode Lua would not have ability to load C code via `require` or `package.loadlib` - Unsafe mode allows everything.
2020-05-12Use Rust allocator for new Lua states that allows to set memory limitAlex Orlenko
2020-05-12Add MetaMethod::Close to support Lua 5.4 to-be-closed variablesAlex Orlenko
2020-05-11Add Lua 5.4 (rc2) supportAlex Orlenko