Commit Graph

546 Commits

Author SHA1 Message Date
Alex Orlenko c3822219e0 Add hooks support (based on rlua v0.17 implementation)
This feature works on lua54, lua53, lua52 and lua51 only.
LuaJIT is unstable.
2020-06-06 16:07:16 +01:00
Alex Orlenko f6da437d8b Update docs 2020-06-06 16:07:16 +01:00
Alex Orlenko 2fd6757f39 Add LuaJIT 2.0.5 stable support 2020-06-06 16:07:16 +01:00
Alex Orlenko 56407fac0d Update CHANGELOG 2020-06-06 16:07:13 +01:00
Alex Orlenko d0fa03e9c8 Bump version to 0.4.0-beta.1 2020-06-06 16:05:35 +01:00
Alex Orlenko cccec914ca Remove deprecated Table::call 2020-05-15 01:48:57 +01:00
Alex Orlenko 687ecc9247 Update documentation 2020-05-15 01:48:57 +01:00
Alex Orlenko 79bfb112aa Remove redundant lifetimes 2020-05-15 01:48:57 +01:00
Alex Orlenko 60c659ecff Add async http server example 2020-05-15 01:48:57 +01:00
Alex Orlenko 9f2d598517 Add clippy check and fix clippy warnings 2020-05-15 01:48:56 +01:00
Alex Orlenko 1492790ece Update compile tests to include async/send features 2020-05-12 03:16:29 +01:00
Alex Orlenko e88f086ed8 Update github workflow 2020-05-12 02:14:48 +01:00
Alex Orlenko 5a9a308790 Provide safe and unsafe Lua modes:
- In safe mode Lua would not have ability to load C code via `require` or `package.loadlib`
- Unsafe mode allows everything.
2020-05-12 02:14:48 +01:00
Alex Orlenko 1b2b94c808 Use Rust allocator for new Lua states that allows to set memory limit 2020-05-12 02:14:48 +01:00
Alex Orlenko 526e7418d8 Add MetaMethod::Close to support Lua 5.4 to-be-closed variables 2020-05-12 02:14:47 +01:00
Alex Orlenko 24d4f04c0d Add Lua 5.4 to github workflow 2020-05-11 02:43:34 +01:00
Alex Orlenko 539b569ff4 Add Lua 5.4 (rc2) support 2020-05-11 02:43:34 +01:00
Alex Orlenko 5c226b4915 Lua 5.4 FFI 2020-05-11 02:43:34 +01:00
Alex Orlenko d366ce0dd4 Scope support (including async) 2020-05-11 02:43:34 +01:00
Alex Orlenko 2bd5c2f6ca Hide Lua "Send" capability under the optional "send" feature flag 2020-05-11 02:43:34 +01:00
Alex Orlenko 7b0e4b4280 Add Send capability to Lua 2020-05-11 02:43:34 +01:00
Alex Orlenko 6e2bb73cff Bind Futures lifetimes to 'lua rather than 'static.
Fix async examples.
2020-05-11 02:43:34 +01:00
Alex Orlenko 7efcee853d Don't allow 'callback outlive 'lua 2020-05-11 02:43:33 +01:00
Alex Orlenko e9c2b8d306 0.3.2 release 2020-04-29 16:32:16 +01:00
Alex Orlenko d672e19365 Add ToLua implementation for slices and arrays 2020-04-29 16:12:58 +01:00
Alex Orlenko bda399a5b4 Get yield function in the moment of async callback creation.
This is usefull to temporary override `coroutine.yield` prior to create_async_callback()
and then restore to original value.
2020-04-28 14:29:36 +01:00
Alex Orlenko fe5e87b0f5 Fix bugs with metatable cache:
- Don't use thread_local as Lua can be created in one thread and executed in another (in module mode);
- Make per state storage without luaL_ref;
2020-04-28 14:29:14 +01:00
Alex Orlenko 0f32e9cb43 0.3.1 release 2020-04-20 01:55:57 +01:00
Alex Orlenko 0efa0fcb6a Update documentation 2020-04-20 01:52:01 +01:00
Alex Orlenko 4e19ae6ccf Update tests (async and table) 2020-04-20 01:14:34 +01:00
Alex Orlenko c826798a6d Minor refactor 2020-04-19 16:51:35 +01:00
Alex Orlenko ee08050c1f Add TableExt trait with call_method/function methods 2020-04-19 16:15:16 +01:00
Alex Orlenko d8897d867b Update examples 2020-04-19 01:23:42 +01:00
Alex Orlenko 222f4df668 Add family of `call_async` function
Update documentation
Move async tests to a separate file
2020-04-18 21:26:12 +01:00
Alex Orlenko afaa0eb639 0.3.0 release 2020-04-17 23:55:58 +01:00
Alex Orlenko db5ad6bc60 Include async build/test to github workflow 2020-04-17 23:55:58 +01:00
Alex Orlenko ef06c5eec9 Update Cargo.toml 2020-04-17 23:55:57 +01:00
Alex Orlenko f7dc9da107 Update README
Cargo fmt and minor changes
2020-04-17 22:52:34 +01:00
Alex Orlenko 47e8a80c1c v0.3.0-alpha.1 with async support
Squashed commit of the async branch.
2020-04-17 22:39:50 +01:00
Alex Orlenko 1a788c48f1 Cherry-pick changes from rlua:
- Make Value::type_name() public
- Update CallbackError and ExternalError Display impl
2020-04-15 21:23:00 +01:00
Alex Orlenko d8b9c46d28 0.2.2 release 2020-02-09 22:21:34 +00:00
Alex Orlenko 9bd6d6fa92 Fix compile fail tests 2020-02-09 22:09:42 +00:00
Alex Orlenko ea6e6e00b2 Update README.md 2020-02-09 21:48:50 +00:00
Alex Orlenko 03ed7f6f99 Fix compile test 2020-01-27 21:57:12 +00:00
Alex Orlenko d5bc9c8c24 Combine lua-vendored and luajit-vendored features into "vendored" 2020-01-27 21:21:50 +00:00
Alex Orlenko 5cd0b645c4 Merge branch 'github_actions' 2020-01-25 23:07:31 +00:00
Alex Orlenko bf36eb72f8 Move from circele-ci to github actions 2020-01-25 22:35:47 +00:00
Alex Orlenko 1f7f8f62ab Merge branch 'lua_vendored' 2020-01-25 20:49:00 +00:00
Alex Orlenko e4dc773aa3 Remove `__ipairs` metamethod deprecated in lua 5.3 and not available by default 2020-01-25 20:47:36 +00:00
Alex Orlenko 07fc4642ae Support vendored versions of Lua and LuaJIT 2020-01-25 20:47:31 +00:00
Alex Orlenko 27121c779d Add raw_insert() and raw_remove() for tables (represented as lists) 2020-01-07 20:53:47 +00:00
Alex Orlenko 5eec0ef56b Implement PartialEq trait for Value (and subtypes)
Add equals() method to compare values optionally invoking __eq.
2020-01-07 00:03:03 +00:00
Alex Orlenko 831161bfda Fix CI badge link 2020-01-06 23:55:56 +00:00
Alex Orlenko 52be96677b 0.2.1 release 2019-12-26 23:09:11 +00:00
Alex Orlenko 42b33849e1 Add support of loading a specified set of standard libraries 2019-12-26 23:04:21 +00:00
Alex Orlenko c9c8f983e0 0.2.0 release 2019-11-30 01:33:41 +00:00
Alex Orlenko 143c3a81a7 Add pair and ipair metamethods support (lua 5.2/5.3 only) 2019-11-30 00:58:42 +00:00
Alex Orlenko fd17a01456 Add Lua 5.2 support 2019-11-30 00:58:41 +00:00
Alex Orlenko 7063c80510 Update README 2019-11-05 15:00:22 +00:00
Alex Orlenko 52e29a1e65 Make upper version of LuaJIT unbounded (fix build on the latest ubuntu) 2019-11-05 14:55:05 +00:00
Alex Orlenko 27a17dfaa8 Fix circleci config 2019-11-05 13:11:30 +00:00
Alex Orlenko b23186dcec Add circleci config 2019-11-05 13:02:06 +00:00
Alex Orlenko 6b9323516f Update README 2019-11-05 11:51:21 +00:00
Alex Orlenko abff36c6c8 Prepare mlua_derive for publishing 2019-11-05 11:50:58 +00:00
Alex Orlenko aa3002b7d9 Update README and description 2019-11-04 22:34:31 +00:00
Alex Orlenko ae677b0918 Move lua 5.1 support under new "lua51" feature 2019-11-04 22:23:15 +00:00
Alex Orlenko 6874c2e004 Fix examples and docs 2019-11-04 22:23:15 +00:00
Alex Orlenko 4a802c1373 Fix benchmarks 2019-11-04 22:23:15 +00:00
Alex Orlenko 551e4f1f87 Add compile_fail tests 2019-11-04 22:23:15 +00:00
Alex Orlenko 6f42a6cca9 Add LuaJIT support 2019-11-04 22:23:15 +00:00
Alex Orlenko 29aa25a48b Dont take wrapped panic in error_tostring() 2019-11-04 22:23:09 +00:00
Alex Orlenko 85607d8bfc Impl Drop for Lua 2019-10-17 17:05:42 +01:00
Alex Orlenko ec08a76a41 Don't store extra data in the lua_State extra space 2019-10-17 17:05:42 +01:00
Alex Orlenko c4fd7a9faf Lua 5.1 support 2019-10-17 17:05:42 +01:00
Alex Orlenko 676ffc0dfd Rename LUA_LIB/LUA_INC variables and link static 2019-10-17 17:05:42 +01:00
Alex Orlenko 430e2e07ea Clear changelog and update license 2019-10-17 17:05:41 +01:00
Alex Orlenko b7c578c274 Replace libc with std::os::raw 2019-10-02 22:12:28 +01:00
Alex Orlenko 224ed8ff52 Add mlua_derive proc macro module 2019-10-02 22:12:27 +01:00
Alex Orlenko cade76137a Rerun build.rs if glue.c changed 2019-10-01 16:11:36 +01:00
Alex Orlenko cb109f6e36 Rename to mlua 2019-10-01 16:11:12 +01:00
Alex Orlenko 9e06b10e50 Support defining custom lua include and lib pathes 2019-09-30 22:41:09 +01:00
Alex Orlenko 2e5762f6e5 fmt glue.c 2019-09-30 22:34:47 +01:00
Alex Orlenko 11e22d1cba Temporary drop "compile-fail" tests due to unstable compiletest_rs crate 2019-09-30 22:34:20 +01:00
Alex Orlenko 2ca4273ffb Add call method to table 2019-09-30 22:15:27 +01:00
Alex Orlenko 78480b5f31 Use main state to store extra data and auxiliary registries 2019-09-30 22:14:58 +01:00
Alex Orlenko 54f4627195 Update tests (excl. compile-fail) 2019-09-29 13:03:32 +01:00
Alex Orlenko 45159bfda7 Add Table::raw_remove method 2019-09-29 12:56:06 +01:00
Alex Orlenko 0c230a3037 Allow to catch rust panics via pcall 2019-09-29 12:56:06 +01:00
Alex Orlenko b23ee6a162 cargo fmt 2019-09-29 12:56:03 +01:00
Alex Orlenko affa85feb0 Backport changes from rlua 0.16 (master branch) 2019-09-29 12:53:13 +01:00
Alex Orlenko 53b352466e Replace ffi module with implementation from "jcmoyer/rust-lua53" crate 2019-09-29 12:42:07 +01:00
Alex Orlenko 14a68dd6d2 Add dyn to trait objects 2019-09-29 12:42:07 +01:00
Alex Orlenko 47a8ac2b05 Allow only init Lua from an exiting state 2019-09-26 19:17:51 +01:00
Alex Orlenko b1aa8f8a80 Remove builtin lua 2019-08-08 18:54:08 +01:00
kyren da3d4c4998 (cargo-release) version 0.15.3 2018-10-13 17:56:42 -04:00
kyren d6998ca8fe update changelog for 0.15.3 2018-10-13 17:54:42 -04:00
kyren 0c1e5c7c5d fix broken .travis.yml 2018-10-13 17:51:44 -04:00
kyren f02444e5a7 add rustfmt checks to travis (stable channel) 2018-10-13 17:48:16 -04:00
kyren 917b432aa5
Merge pull request #96 from sakridge/fix-num-traits-version
Update num-traits dependency to 0.2.6
2018-10-11 14:35:00 -04:00
Stephen Akridge da6e92d16d Update num-traits dependency to 0.2.6
This crate requires i128 support which is not
added to num-traits until the 0.2.5 release and i128
detection is added in 0.2.6.
2018-10-11 10:40:03 -07:00