Alex Orlenko
a13c188de3
Rename ToLua/ToLuaMulti -> IntoLua/IntoLuaMulti
2022-12-19 23:00:47 +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
cca177df5b
Minor serde optimizations
2022-10-23 03:13:24 +01:00
Alex Orlenko
04ba93137c
Add `Table::to_pointer()` and `String::to_pointer()` functions
2022-06-27 14:58:48 +01:00
Alex Orlenko
93d36b9068
More performance optimization (userdata part)
2022-06-06 21:42:55 +01:00
Alex Orlenko
30ba616a8a
Correctly deserialize newtype struct ( #168 )
2022-05-24 23:26:17 +01:00
Alex Orlenko
86f506a170
Fix clippy warnings
2022-04-14 21:55:36 +01:00
Alex Orlenko
d1c80be033
Don't cast *const to *mut (for pointers comparison)
2022-04-08 22:52:55 +01:00
Alex Orlenko
ec1fa04085
Update docs
2022-03-25 00:43:54 +00:00
Alex Orlenko
3a9c8c2da2
Add Luau vector datatype support
2022-03-22 21:14:06 +00:00
Alex Orlenko
6dc127f4eb
Refactor ffi module
...
Initial Luau support work
2022-03-20 20:30:18 +00:00
Alex Orlenko
cfb5d3fd45
Fix clippy warnings
2021-12-28 12:23:06 +00:00
Alex Orlenko
0741db7565
Make (De)SerializeOptions as const
2021-11-04 01:07:38 +00:00
Alex Orlenko
a9ca99349c
Switch to FxHash
2021-10-19 11:45:38 +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
c8c64a1b5a
Add serializing i128/u128 types.
...
Fixes #81 .
2021-10-04 23:20:11 +01:00
Alex Orlenko
d098c9ccf6
Refactor Waker handling in async code.
...
Instead of storing `Option<Waker>` in the Lua registry, store it on the reference thread.
It gives approx +10% performance gain when calling async function.
2021-10-03 22:09:19 +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
bdd3c923ba
Fix table traversal used in recursion detection.
...
This fixes serializing same table multiple times within a parent table.
2021-09-28 16:41:39 +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
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
d906405818
Simplify interface of `hook::HookTriggers`
2021-08-18 18:49:17 +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
af67971e0d
Make `SerializeOptions` non_exhaustive.
...
Add builder implementation similar to `LuaOptions` to set individual options.
2021-05-03 22:33:12 +01:00
Alex Orlenko
64346ce56c
Implement/Derive `Debug` for Lua and few other structs
2021-05-03 13:05:43 +01:00
Alex Orlenko
3f55958bdd
Stack assertions review
...
Other minor code and documentation updates
2021-05-02 11:42:03 +01:00
Alex Orlenko
f5b88624ce
Hide Deserializer inner fields
...
Improve documentation
2021-04-27 10:04:18 +01:00
Alex Orlenko
2fae94586d
Remove Result from lua.null() and lua.array_metatable(). They never fail.
2021-04-27 00:38:13 +01:00
Alex Orlenko
bc81d1016f
Add SerializeOptions to to change default Lua serializer behaviour
2021-04-27 00:35:53 +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
5f37bf812d
Fix/whitelist some clippy warnings
2021-02-27 19:23:08 +00:00
Alex Orlenko
b6ff501b8c
Fix numeric types conversion for 32bit lua. Fix #27
2021-01-20 10:46:23 +00:00
Alex Orlenko
9f82cbe0c5
Update documentation
2020-12-31 13:39:38 +00:00
Alex Orlenko
afc41ab23c
Add serialization example & update others
2020-12-29 21:39:34 +00:00
Alex Orlenko
6e2b687cb7
Serde support (serialize feature flag)
2020-12-14 00:51:26 +00:00