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
c95ac32741
Add inline(always) to some compat53 functions
2021-04-27 00:29:37 +01:00
Alex Orlenko
5a7ad9f7cd
Fix some clippy warnings & minor changes
2021-04-27 00:29:37 +01:00
Alex Orlenko
7775b4a99c
Bump copyright year
2021-02-26 10:35:00 +00:00
Alex Orlenko
e62fd400d7
Remove unused exports from glue.{c,rs} && Fix some clippy warnings
2021-01-16 13:31:45 +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
dd58cdad52
Add Function::dump() to dump lua function to a binary chunk
2020-07-27 23:26:33 +01:00
Alex Orlenko
0a13a9631d
Fix LuaJIT 2.1 libraries loading
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
95b9fe8dac
Fix clippy warnings
2020-06-07 20:38:19 +01:00
Alex Orlenko
d5c22d989a
Dirty hack to get lua 5.1 main state
2020-06-06 16:07:16 +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
9f2d598517
Add clippy check and fix clippy warnings
2020-05-15 01:48:56 +01:00
Alex Orlenko
1b2b94c808
Use Rust allocator for new Lua states that allows to set memory limit
2020-05-12 02:14:48 +01:00
Alex Orlenko
5c226b4915
Lua 5.4 FFI
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
42b33849e1
Add support of loading a specified set of standard libraries
2019-12-26 23:04:21 +00:00
Alex Orlenko
fd17a01456
Add Lua 5.2 support
2019-11-30 00:58:41 +00:00
Alex Orlenko
ae677b0918
Move lua 5.1 support under new "lua51" feature
2019-11-04 22:23:15 +00:00
Alex Orlenko
c4fd7a9faf
Lua 5.1 support
2019-10-17 17:05:42 +01:00
Alex Orlenko
b7c578c274
Replace libc with std::os::raw
2019-10-02 22:12:28 +01:00
Alex Orlenko
2e5762f6e5
fmt glue.c
2019-09-30 22:34:47 +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
53b352466e
Replace ffi module with implementation from "jcmoyer/rust-lua53" crate
2019-09-29 12:42:07 +01:00