Alex Orlenko
aaf0a5e44a
Remove usage of crate::ffi (clippy)
2023-04-14 00:36:31 +01:00
Alex Orlenko
cdbf04f50c
Add pretty-print to the Debug formatting to Value to Table.
...
This would allow dumping any Lua variable in human readable form.
2023-04-11 20:36:41 +01:00
Alex Orlenko
f66932e8d2
Revert "Rename Owned*::to_ref() to as_ref()"
...
This reverts commit 5394faca16 .
2023-03-30 22:35:43 +01:00
Alex Orlenko
781ded573a
Seal LuaSerdeExt/TableExt/AnyUserDataExt
2023-03-19 02:38:21 +00:00
Alex Orlenko
5394faca16
Rename Owned*::to_ref() to as_ref()
2023-03-02 15:36:11 +00:00
Alex Orlenko
fa46720f5a
Add Table::clear() method
2023-01-02 15:50:21 +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
9b4e3a1598
Refactor LuaInner state
...
Add static_assertions to check for auto traits impl on compilation stage
Bump MSRV to 1.63 (required for `Ref::filter_map`)
2022-12-19 16:09:05 +00:00
Alex Orlenko
bf79d9e75d
Initial implementation of owned Lua types
2022-12-18 00:35:41 +00:00
Alex Orlenko
a6ca65aa74
Better checks and tests when trying to modify a Luau readonly table
2022-10-30 11:41:09 +00:00
Alex Orlenko
a7278cab78
Fix Table::raw_push for luau when readonly
2022-10-29 23:02:19 +01:00
Alex Orlenko
e98998d6ac
Add push/pop methods to Table
2022-10-23 23:27:17 +01:00
Alex Orlenko
959e61b97c
Optimize tables:
...
- Use reference thread directly for simple cases
- Fix issue when calling raw_set on readonly table (Luau)
- Add fasttrack methods for get/set/len when metatable is not set
2022-10-22 23:45:58 +01:00
Alex Orlenko
fcd162f3eb
Replace Lua::ref_thread_exec
2022-10-22 23:39:49 +01:00
Alex Orlenko
04ba93137c
Add Table::to_pointer() and String::to_pointer() functions
2022-06-27 14:58:48 +01:00
Alex Orlenko
3766cee4dd
Experimental optimization to skip oom check
2022-05-30 18:42:34 +01:00
Alex Orlenko
55fac90a74
Fix Luau documentation in docs.rs
...
Enable `Lua::gc_inc` for Luau
Mark `debug` module as safe for Luau
2022-04-08 20:02:12 +01:00
Alex Orlenko
87c10ca93d
Sandboxing support
2022-03-28 23:42:35 +01:00
Alex Orlenko
ec1fa04085
Update docs
2022-03-25 00:43:54 +00:00
Alex Orlenko
0a3b65af88
Support readonly table attribute (luau)
2022-03-22 21:33:29 +00:00
Alex Orlenko
f9fe869b76
Optimize async calls:
...
Rewrite "unpack" function using C api rather than high level abstraction.
2022-01-29 12:39:30 +00:00
Alex Orlenko
2fee3e7891
Update docs
2021-11-25 18:01:41 +00:00
Alex Orlenko
170818c469
Add call() function to TableExt to call tables with __call metamethod as functions
2021-11-21 23:47:45 +00:00
Alex Orlenko
b0da2fc439
Switch Table::serialize to FxHashSet
2021-11-07 14:49:19 +00:00
Alex Orlenko
fbc2973aff
Fix recursive tables serialization when using serde::ser::Serialize
...
implementation for Table.
Fixes #98 .
2021-11-06 21:12:00 +00: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
5b1483bd56
Change syntax of protect_lua macro
2021-09-28 18:47:08 +01:00
Alex Orlenko
a74b637ed4
Update check_stack requirements
2021-09-28 18:41:25 +01:00
Alex Orlenko
e42d67c70d
Make protect_lua as a smart macro to choose from C/closure
2021-09-28 16:26:30 +01:00
Alex Orlenko
1731f5d61b
Revert "Make protect_lua as a smart macro to choose from C/closure"
...
This reverts commit 84fe5f7f76 .
2021-07-08 18:41:10 +01:00
Alex Orlenko
84fe5f7f76
Make protect_lua as a smart macro to choose from C/closure
2021-07-07 12:54:19 +01:00
Alex Orlenko
d3f44354e0
Revert commit ced808d5ab
...
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-16 22:13:01 +01:00
Alex Orlenko
0bad4a0ff9
Fix spelling
2021-05-10 19:53:38 +01:00
Alex Orlenko
3f55958bdd
Stack assertions review
...
Other minor code and documentation updates
2021-05-02 11:42:03 +01:00
Alex Orlenko
ced808d5ab
Don't trigger longjmp in rust.
...
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 00:29:38 +01:00
Alex Orlenko
e0da6ac929
Hide raw_sequence_values_by_len under async/serialize feature flags
2021-04-16 22:09:49 +01:00
Alex Orlenko
7cb9c4f39c
Fix bug in returning nil-prefixed multi values from async function
2021-03-03 22:32:22 +00:00
Alex Orlenko
9f82cbe0c5
Update documentation
2020-12-31 13:39:38 +00:00
Alex Orlenko
6e2b687cb7
Serde support (serialize feature flag)
2020-12-14 00:51:26 +00: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
9f2d598517
Add clippy check and fix clippy warnings
2020-05-15 01:48:56 +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
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
6874c2e004
Fix examples and docs
2019-11-04 22:23:15 +00:00
Alex Orlenko
cb109f6e36
Rename to mlua
2019-10-01 16:11:12 +01:00
Alex Orlenko
2ca4273ffb
Add call method to table
2019-09-30 22:15:27 +01:00