Alex Orlenko
77d7d5d6bd
Add initial Lua 5.5 support
2026-01-13 23:43:31 +00:00
Alex Orlenko
ca22ea3be7
Deprecate Debug::curr_line() in favour of Debug::current_line() that returns Option
2025-07-08 10:09:26 +01:00
Alex Orlenko
1f970824b4
Support user thread creation callback (Luau)
2025-03-28 11:51:35 +00:00
Alex Orlenko
74b4601b48
Rework Lua hooks:
...
- Support global hooks inherited by new threads
- Support thread hooks, where each thread can have its own hook
This should also allow to enable hooks for async calls.
Related to #489 #347
2025-02-07 22:42:17 +00:00
Alex Orlenko
1c6b6ad801
Fix tests
2024-12-01 12:54:35 +00:00
Alex Orlenko
fc1570d2d7
Support yielding from hooks for Lua 5.3+
2024-09-22 19:04:32 +01:00
Alex Orlenko
3641c98959
Prepare for Rust 2024 edition (see rust-lang/rust#123748 )
...
Replace `IntoLua(Multi)` generic with positional arg (impl trait) where possible
This allow to shorten syntax from `a.get::<_, T>` to `a.get::<T>`
2024-07-31 23:42:43 +01:00
Alex Orlenko
b4892c228c
Add rustfmt.toml
2024-07-31 13:42:37 +01:00
Alex Orlenko
54c14cc5b8
Update luajit (vendored) to 210.5.0
...
This includes switch from openresty's to vanilla luajit
2023-09-29 12:57:29 +01:00
Alex Orlenko
7dc6e4c132
Add Error::runtime() helper
2023-07-10 22:41:03 +01:00
Alex Orlenko
24e14c4874
Always set hook on a current Lua context (state) and remove MainThreadNotAvailable as no longer needed
2023-07-09 12:33:21 +01:00
Alex Orlenko
b3b8d79446
Make Debug interface more user friendly
...
- use String instead of Vec<u8>
- update docs
- unify fields between lua5.x/luau
- line numbers are `usize`
2023-07-06 00:38:33 +01:00
Alex Orlenko
3e83753466
Add Thread::set_hook() function
2023-04-08 23:53:48 +01:00
Alex Orlenko
288934c82c
Refactor HookTriggers (make it const)
2023-04-05 01:02:27 +01:00
Alex Orlenko
4492a20bbc
Make LuaHook as Fn instead of FnMut to remove Mutex and improve performance
2022-03-30 23:55:34 +01:00
Alex Orlenko
c322e028e2
Initial Luau support
2022-03-20 20:30:20 +00:00
Alex Orlenko
d906405818
Simplify interface of hook::HookTriggers
2021-08-18 18:49:17 +01:00
Alex Orlenko
9f02a9ca09
Add Debug::event() to the hook's Debug structure
2021-08-17 15:17:03 +01:00
Alex Orlenko
b84d1bd65f
Update test names
2021-06-18 23:13:56 +01:00
Alex Orlenko
e26cec5db9
Drop 'feature(link_args)' (removed from nightly). Don't run tests for LuaJIT 2.0.5
2021-04-16 22:27:28 +01:00
Alex Orlenko
efcaef3db7
Enable hooks support for LuaJIT
2020-06-07 20:38:19 +01:00
Alex Orlenko
3d42bc4ca6
Refactor main_state handling
...
Don't allow to set hook if main_state is not available
Remove Lua 5.1 dirty hack
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