summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-04-19Minor refactorAlex Orlenko
2020-04-19Add TableExt trait with call_method/function methodsAlex Orlenko
2020-04-18Add family of `call_async` functionAlex Orlenko
Update documentation Move async tests to a separate file
2020-04-17v0.3.0-alpha.1 with async supportAlex Orlenko
Squashed commit of the async branch.
2020-04-15Cherry-pick changes from rlua:Alex Orlenko
- Make Value::type_name() public - Update CallbackError and ExternalError Display impl
2020-01-25Remove `__ipairs` metamethod deprecated in lua 5.3 and not available by defaultAlex Orlenko
2020-01-07Add raw_insert() and raw_remove() for tables (represented as lists)Alex Orlenko
2020-01-07Implement PartialEq trait for Value (and subtypes)Alex Orlenko
Add equals() method to compare values optionally invoking __eq.
2019-12-26Add support of loading a specified set of standard librariesAlex Orlenko
2019-11-30Add pair and ipair metamethods support (lua 5.2/5.3 only)Alex Orlenko
2019-11-30Add Lua 5.2 supportAlex Orlenko
2019-11-04Move lua 5.1 support under new "lua51" featureAlex Orlenko
2019-11-04Fix examples and docsAlex Orlenko
2019-11-04Dont take wrapped panic in error_tostring()Alex Orlenko
2019-10-17Impl Drop for LuaAlex Orlenko
2019-10-17Don't store extra data in the lua_State extra spaceAlex Orlenko
2019-10-17Lua 5.1 supportAlex Orlenko
2019-10-02Replace libc with std::os::rawAlex Orlenko
2019-10-02Add mlua_derive proc macro moduleAlex Orlenko
2019-10-01Rename to mluaAlex Orlenko
2019-09-30fmt glue.cAlex Orlenko
2019-09-30Add call method to tableAlex Orlenko
2019-09-30Use main state to store extra data and auxiliary registriesAlex Orlenko
2019-09-29Add Table::raw_remove methodAlex Orlenko
2019-09-29Allow to catch rust panics via pcallAlex Orlenko
2019-09-29cargo fmtAlex Orlenko
2019-09-29Backport changes from rlua 0.16 (master branch)Alex Orlenko
2019-09-29Replace ffi module with implementation from "jcmoyer/rust-lua53" crateAlex Orlenko
2019-09-29Add dyn to trait objectsAlex Orlenko
2019-09-26Allow only init Lua from an exiting stateAlex Orlenko
2018-10-01Allow non-utf8 Lua source in load / exec / evalkyren
2018-10-01Some documentation and changelog fixeskyren
2018-09-30Allow arbitrary [u8] Lua stringskyren
2018-09-26Avoid mem::uninitialized in generic context as it is unsound with e.g. boolkyren
2018-09-26Improve the situation with numerical conversionkyren
This is a somewhat involved change with two breaking API changes: 1) Lua::coerce_xxx methods now return Option (this is easier and faster than dealing with Result) 2) rlua numeric conversions now allow more loss of precision conversions (e.g. 1.5f32 to 1i32) The logic for the first breaking change is that mostly the coerce methods are probably used internally, and they make sense as low-level fallible casts and are now used as such, and there's no reason to confuse things with a Result with a large error type and force the user to match on the error which will hopefully only be FromLuaConversionError anyway. The logic for the second change is that it matches the behavior of num_traits::cast, and is more consistent in that *some* loss of precision conversions were previously allowed (e.g. f64 to f32). The problem is that now, Lua::coerce_integer and Lua::unpack::<i64> have different behavior when given, for example, the number 1.5. I still think this is the best option, though, because the Lua::coerce_xxx methods represent how Lua works internally and the standard C API cast functions that Lua provides, and the ToLua / FromLua code represents the most common form of fallible Rust numeric conversion. I could revert this change and turn `Lua::eval::<i64>("1.5", None)` back into an error, but it seems inconsistent to allow f64 -> f32 loss of precision but not f64 -> i64 loss of precision.
2018-09-24Return rlua::Error on out of range numeric conversions using num_traits::castkyren
2018-09-16Merge pull request #79 from acrisci/system-lua-pkg-configkyren
find system lua with pkg-config
2018-09-16Move integration tests into top-level tests directorykyren
other minor refactors
2018-09-16Rename Scope::create_userdata to Scope::create_nonstatic_userdatakyren
avoids clashing with the previous method name to avoid confusion
2018-09-04basic tests for nonstatic userdatakyren
2018-09-04comment terminology... fix?kyren
2018-09-04code re-org have slightly less pub(crate) itemskyren
2018-09-04Comment updates that I really hope are correctkyren
Tried to explain the rationale for safety around callbacks in Lua and Scope a bit better, because every time I don't look at this for a while I forget my reasoning. I'm not always so great at using the right terminology, so to whoever reads this, if I got this wrong please tell me.
2018-09-04Initial design for non-'static scoped userdatakyren
Uses the same UserData trait, and should at least in theory support everything that 'static UserData does, except that any functions added that rely on AnyUserData are pretty much useless. Probably pretty slow and I'm not sure how to make it dramatically faster, which is a shame because generally when you need non'-static userdata you might be creating it kind of a lot (if it was long-lived, it would probably be 'static). Haven't added tests yet, will do that next.
2018-09-04Don't leak userdata if the metatable creation errors or panicskyren
2018-09-02small macro style changekyren
2018-09-02Implement tuple MultiValue tuple conversion up to 16kyren
2018-08-05Solve (maybe) *another* soundness issue with `Lua::scope`kyren
Callbacks should not be able to capture their arguments and hold onto them, because the `&Lua` used in previous calls will not remain valid across calls. One could imagine an API where the specific `&Lua` is simply stored inside the `Scope` itself, but this is harder to do, and would (badly) encourage storing references inside Lua userdata. Ideally, the only way it should be possible to store Lua handles inside Lua itself is through usafety or the `rental` crate or other self-borrowing techniques to make references into 'static types. If at all possible this roadblock should stay, because reference types inside userdata are almost always going to lead to a a memory leak, and if you accept the risks you should just use `RegistryKey` with its manual removal.
2018-08-05Remove out of date documentation, simpler scope lifetimeskyren
The documentation describing it being a logic bug to access "outer" callback handles when inside an "inner" callback is inaccurate, that was only true when using an older design for handle values. Also, there is no reason to have a separate 'callback lifetime, because 'scope is already invariant and just using 'scope seems equivalent.
2018-08-05Fix for a soundness bug around scope, don't allow callback parameters to escapekyren
Also includes other fixes for compiletest_rs failures, and a small reorg of tests