Commit Graph

128 Commits

Author SHA1 Message Date
Michael Pfaff 061f84f702
Turn more comments into doc comments, improve debuggability 2023-07-16 14:39:35 -04:00
Michael Pfaff 11d81209d9
API changes, inline more often 2023-07-06 13:06:08 -04:00
Alex Orlenko 1f0e81c9a1
Add a dedicated type for Luau vector.
Refactor existing implementation and add 4-dimensional vectors support.
2023-06-20 13:30:42 +01:00
Alex Orlenko cea2d7fd15
Refactor application data container.
Now it's allowed at the same time mutably and immutably borrow different types.
Each value in the application data container is stored in it's own `RefCell` wrapper.
Also added new function `Lua::try_set_app_data()`.
2023-05-29 00:30:31 +01:00
Alex Orlenko 3d7796de55
clippy 2023-05-27 22:08:42 +01:00
Alex Orlenko a1d385c7b7
Add OwnedString 2023-04-26 23:17:27 +01:00
Alex Orlenko 0fccdfed5c
Fix feature flags for owned types 2023-04-14 01:17:26 +01:00
Alex Orlenko aaf0a5e44a
Remove usage of crate::ffi (clippy) 2023-04-14 00:36:31 +01:00
Alex Orlenko f9d1213c4b
Don't set html_root_url (it's not recommended) 2023-04-13 22:44:40 +01:00
Alex Orlenko 15dc0e9f23
Move ffi module into mlua-sys crate 2023-04-12 23:23:34 +01:00
Alex Orlenko 6fa0a78ec0
Prepare v0.9.0-beta.1 2023-03-30 23:18:10 +01:00
Alex Orlenko e182d474e0
More user-friendly error message about missing value for `name` attribute in module macro
Update the `[lua_module]` doc
2023-03-28 16:27:16 +01:00
Alex Orlenko d9aac08b81
Support setting memory limit for Lua 5.1/JIT/Luau
Other versions already support this feature.
Closes #119
2023-03-26 00:06:52 +00:00
Alex Orlenko 781ded573a
Seal LuaSerdeExt/TableExt/AnyUserDataExt 2023-03-19 02:38:21 +00:00
Alex Orlenko 8d80321738
Add `ErrorContext` extension trait to attach additional context to `Error` 2023-03-17 01:20:57 +00:00
Alex Orlenko 3059f82552
Update README and CHANGELOG 2023-03-12 23:54:19 +00:00
Alex Orlenko 4a3f6d60ad
Update exports in libs and prelude 2023-03-02 15:34:42 +00:00
Alex Orlenko 68b60e2a0a
Add `UserDataRef` and `UserDataRefMut` types that implement `FromLua`
and can be used as accessors to underlying `AnyUserData` type.
2023-02-26 21:52:28 +00:00
Alex Orlenko 94f01e597c
Add `AnyUserDataExt` trait with auxiliary functions for `AnyUserData` 2023-02-18 23:40:28 +00:00
Alex Orlenko f52abf919e
Add create_userdata_ref/create_userdata_ref_mut for scope (#206)
New methods would allow creating userdata objects from (mutable) reference
to a UserData of registered type.
2023-02-12 16:37:02 +00:00
Alex Orlenko a13c188de3
Rename ToLua/ToLuaMulti -> IntoLua/IntoLuaMulti 2022-12-19 23:00:47 +00:00
Alex Orlenko c60f633a62
Add "unstable" feature flag.
Hide owned types under the new feature flag.
Drop OwnedString/OwnedThread types (unlikely they are useful).
2022-12-19 22:26:44 +00:00
Alex Orlenko bf79d9e75d
Initial implementation of owned Lua types 2022-12-18 00:35:41 +00:00
Alex Orlenko 6807dfa22e
v0.8.6 2022-11-07 01:05:14 +00:00
Alex Orlenko 693a808b6e
v0.8.5 2022-10-30 12:31:26 +00:00
Alex Orlenko 7f14d93c2b
v0.8.4 2022-10-09 14:40:15 +01:00
Alex Orlenko 83ed442bf9
v0.8.3 2022-08-02 12:43:15 +01:00
Alex Orlenko 185fee956d
v0.8.2 2022-07-25 14:23:25 +01:00
Alex Orlenko b46b476f80
v0.8.1 2022-06-29 15:41:22 +01:00
Alex Orlenko 4afca8f5bb
Prepare for v0.8.0 release 2022-06-02 22:44:07 +01:00
Alex Orlenko 4f06f614a9
v0.8.0-beta.5 2022-05-25 01:47:38 +01:00
Alex Orlenko 0076aa735a
Add `Function::coverage` for Luau to obtain coverage report 2022-05-24 02:01:46 +01:00
Alex Orlenko 32a3f478bd
v0.8.0-beta.4 2022-04-25 23:18:27 +01:00
Alex Orlenko 5133a9837a
Add `Function::info()` to get information about functions.
Closes #149 and #7.
2022-04-18 18:28:11 +01:00
Alex Orlenko d607039a31
v0.8.0-beta.3 2022-04-03 23:38:41 +01:00
Alex Orlenko 595dc3e95f
Move some Luau functionality to a new module
Immplement native "vector" function to construct vectors
2022-03-31 19:31:37 +01:00
Alex Orlenko 595bc3a2b3
Support Luau interrupts (closes #138) 2022-03-30 22:01:06 +01:00
Alex Orlenko ec1fa04085
Update docs 2022-03-25 00:43:54 +00:00
Alex Orlenko c6d3727171
Prepare v0.8.0-beta.1 2022-03-21 01:37:08 +00:00
Alex Orlenko 405cff5d49
Move StaticUserData* implementation from `lua` module to the new `userdata_impl` 2022-03-21 01:08:48 +00:00
Alex Orlenko 32124b31a0
Move chunks structs to a new module.
Add Luau Compiler interface to compile sources.
2022-03-21 01:08:47 +00:00
Alex Orlenko 3e5f8e7bb8
Enable `Lua::inspect_stack` for Luau 2022-03-21 01:08:47 +00:00
Alex Orlenko c322e028e2
Initial Luau support 2022-03-20 20:30:20 +00:00
Alex Orlenko c85616137a
v0.7.4 2022-03-01 19:59:49 +00:00
Alex Orlenko c213a85ef0
v0.7.3 2022-01-19 18:12:45 +00:00
Alex Orlenko 418e8fba32
v0.7.2 2022-01-17 11:12:46 +00:00
Alex Orlenko 386eb7a2b7
v0.7.1 2021-12-23 19:42:52 +00:00
Alex Orlenko 89580dd863
v0.7.0 2021-11-25 18:18:38 +00:00
Alex Orlenko 2fee3e7891
Update docs 2021-11-25 18:01:41 +00:00
Alex Orlenko 09af3e021a
v0.6.6 2021-10-12 12:22:14 +01:00
Alex Orlenko ed48b11e7f
Update documentation references
Using rustdoc links (see RFC https://github.com/rust-lang/rfcs/pull/1946)
2021-10-12 00:49:45 +01:00
Alex Orlenko 259eb09ae1
v0.6.5 2021-10-05 18:11:32 +01:00
Alex Orlenko 584b377640
v0.6.4 2021-09-28 18:53:47 +01:00
Alex Orlenko 7623016d4a
Fix doc feature labels 2021-09-28 18:15:53 +01:00
Alex Orlenko 35eedd5a5e
v0.6.3 2021-09-16 00:55:49 +01:00
Alex Orlenko fc1fe2c15e
Add `DeserializeOptions` struct to control deserializer behavior.
This solves #74 and provides a way to deserialize a Lua globals table.
2021-09-15 23:45:08 +01:00
Alex Orlenko 9f02a9ca09
Add `Debug::event()` to the hook's Debug structure 2021-08-17 15:17:03 +01:00
Alex Orlenko 628b70f561
v0.6.2 2021-07-13 20:29:25 +01:00
Alex Orlenko 1fe583027b
Add new functions: `lua.load_from_function()` and `lua.create_c_function()`
This should be useful to register embedded C modules to Lua state.
Provides a solution for #61
2021-07-05 00:03:18 +01:00
Alex Orlenko fc84e8623e
v0.6.1 2021-06-28 00:10:07 +01:00
Alex Orlenko 8aae9a7c3e
Update chunk! documentation 2021-06-28 00:10:04 +01:00
Alex Orlenko 7feabffc37
v0.6.0 2021-06-21 23:19:56 +01:00
Alex Orlenko 0fe898c0dd v0.6.0-beta.3 2021-06-04 12:38:09 +01:00
Alex Orlenko 973b5c3bf5 v0.6.0-beta.2 2021-05-13 23:10:19 +01:00
Alex Orlenko c9b8eb5418 Re-export UserDataFields/UserDataMetatable 2021-05-09 09:30:33 +01:00
Alex Orlenko 3e03f4201c Add chunk! macro support 2021-05-05 22:13:51 +01:00
Alex Orlenko 8e57e6fa5a v0.6.0-beta.1 2021-05-04 00:43:26 +01:00
Alex Orlenko 3829b72212 Update code docs 2021-05-03 22:33:18 +01:00
Alex Orlenko 0f4bcca7ce Add `LuaOptions` to customize Lua/Rust behaviour.
The only option is `catch_rust_panics` to optionally disable catching Rust panics via pcall/xpcall.
2021-05-03 21:33:49 +01:00
Alex Orlenko f5b88624ce Hide Deserializer inner fields
Improve documentation
2021-04-27 10:04:18 +01:00
Alex Orlenko bc81d1016f Add SerializeOptions to to change default Lua serializer behaviour 2021-04-27 00:35:53 +01:00
Alex Orlenko 2b2df708f9 Add `UserDataFields` API.
Provide safe access to UserData metatable and allow to define custom metamethods..
2021-04-27 00:29:37 +01:00
Alex Orlenko cb1ac28f2a v0.5.4 2021-04-20 02:05:05 +01:00
Alex Orlenko c363fb9288 v0.5.3 2021-03-04 00:01:06 +00:00
Alex Orlenko b93ace0224 v0.5.2 2021-02-27 19:32:25 +00:00
Alex Orlenko aeb66115f7 v0.5.1 2021-01-20 11:04:03 +00:00
Alex Orlenko 618874ef3c v0.5.0 2020-12-31 13:39:42 +00:00
Alex Orlenko 9f82cbe0c5 Update documentation 2020-12-31 13:39:38 +00:00
Alex Orlenko bedd430eb5 Re-export mlua_derive 2020-12-29 22:26:15 +00:00
Alex Orlenko 6e2b687cb7 Serde support (serialize feature flag) 2020-12-14 00:51:26 +00:00
Alex Orlenko d201beadc9 Add ChunkMode enum to mark chunks as text or binary 2020-07-28 21:04:21 +01:00
Alex Orlenko efcaef3db7 Enable hooks support for LuaJIT 2020-06-07 20:38:19 +01:00
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 687ecc9247 Update documentation 2020-05-15 01:48:57 +01:00
Alex Orlenko 539b569ff4 Add Lua 5.4 (rc2) support 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 0efa0fcb6a Update documentation 2020-04-20 01:52:01 +01:00
Alex Orlenko ee08050c1f Add TableExt trait with call_method/function methods 2020-04-19 16:15:16 +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 42b33849e1 Add support of loading a specified set of standard libraries 2019-12-26 23:04:21 +00:00
Alex Orlenko cb109f6e36 Rename to mlua 2019-10-01 16:11:12 +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 47a8ac2b05 Allow only init Lua from an exiting state 2019-09-26 19:17:51 +01:00
kyren 51339ecb1d Some documentation and changelog fixes 2018-10-01 05:14:43 -04:00
kyren c3d0110722 Return rlua::Error on out of range numeric conversions using num_traits::cast 2018-09-24 22:14:50 -04:00
kyren b8da08187d Move integration tests into top-level tests directory
other minor refactors
2018-09-16 20:15:51 -04:00
kyren 2e1bdb64c0 format with up-to-date rustfmt 2018-08-05 09:51:39 -04:00
kyren f79d771f1a Documentation improvements, split scope into its own module, improved tests
Also makes `Lua` and associated types !UnwindSafe and !RefUnwindSafe, which they
should be because they are intensely internally mutable.  Lua IS still panic
safe, but that doesn't mean it should be marked as UnwindSafe (as I understand
it).
2018-03-12 16:00:11 -04:00
kyren a49ea51b79 Remove terrible awful no-good evil hack
The breakage is being addressed in rust itself.
2018-02-19 18:09:04 -05:00