Alex Orlenko
ea2faa3755
clippy
2024-05-15 23:11:33 +01:00
Alex Orlenko
59c9abbac7
Fix serializing same table multiple times.
...
Fixes #408
2024-05-14 00:42:04 +01:00
Alex Orlenko
8a9c4f0b15
Optimize table array traversal during serialization
2024-02-11 23:02:36 +00:00
Alex Orlenko
908f37656a
Add to_pointer function to Function/Table/Thread
2024-02-02 09:23:16 +00:00
Alex Orlenko
ec0fb7614e
Optimize Table serialization (faster traversal)
2023-10-12 10:37:52 +01:00
Alex Orlenko
04c0763146
Optimize iterating over array part of table
2023-10-12 09:52:34 +01:00
Alex Orlenko
2a3980ef62
Add Table::for_each method for fast (faster than pairs()) table pairs traversal.
2023-10-10 12:52:26 +01:00
Alex Orlenko
adb979761e
Optimize table traversal (pairs iterator).
2023-10-10 11:25:21 +01:00
Alex Orlenko
09eb7f251b
Support options for Value::serialize() implementation
...
To match `lua.from_value_with()` functionality.
2023-08-12 17:24:57 +01:00
Alex Orlenko
170aa53e29
Change Table::raw_len() output type to usize.
2023-08-06 22:45:06 +01:00
Alex Orlenko
0b928fdfee
Faster table ops
2023-08-03 10:37:52 +01:00
Alex Orlenko
bfd1c29c0a
Add back Table::raw_sequence_values() with deprecation notice
2023-07-11 16:02:28 +01:00
Alex Orlenko
7dc6e4c132
Add Error::runtime() helper
2023-07-10 22:41:03 +01:00
Alex Orlenko
a9b0cdfc03
Take &str as function name in TableExt and AnyUserDataExt traits
2023-07-09 22:49:16 +01:00
Alex Orlenko
541139b944
Change Lua ref types Debug print from Ref{index} to Ref{pointer}
...
The index is always uniq per instance, but pointer can exactly tell when
several values reference to the same Lua internal value.
2023-07-08 12:52:14 +01:00
Alex Orlenko
85f17a269d
Add Table:is_empty() function
2023-06-26 10:50:18 +01:00
Alex Orlenko
b169031d4e
Don't use any metamethods in Table::sequence_values() iterator.
...
This is matches with `Table::pair()` iterator.
Remove `Table::raw_sequence_values()` iterator.
2023-06-26 10:46:59 +01:00
Alex Orlenko
c1168d3ec1
Refactor call_async() functions to use static dispatch outside of traits
2023-06-21 12:44:24 +01: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
c2bfc9ec52
Implement PartialEq<[T]> for tables
2023-06-19 23:28:08 +01:00
Alex Orlenko
e0224ab159
Use futures-core and futures-tasks via futures-util.
...
Just to reduce number of dependencies.
2023-05-29 00:30:29 +01:00
Alex Orlenko
3d7796de55
clippy
2023-05-27 22:08:42 +01:00
Alex Orlenko
4daa7de997
Various improvements for owned types, including:
...
- tests
- shortcuts for `OwnedFunction` and `OwnedAnyUserData`
2023-04-26 15:40:48 +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
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