mlua 0.12.0

High level bindings to Lua 5.5/5.4/5.3/5.2/5.1 (including LuaJIT) and Luau with async/await features and support of writing native Lua modules in Rust.
Documentation
error[E0277]: the type `UnsafeCell<mlua::state::RawLua>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
 --> tests/compile/ref_nounwindsafe.rs:8:18
  |
8 |     catch_unwind(move || table.set("a", "b").unwrap());
  |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<mlua::state::RawLua>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
  |     |
  |     required by a bound introduced by this call
  |
  = help: within `alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<mlua::state::RawLua>`
note: required because it appears within the type `lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>`
 --> $CARGO/lock_api-$VERSION/src/remutex.rs
  |
  | pub struct ReentrantMutex<R, G, T: ?Sized> {
  |            ^^^^^^^^^^^^^^
note: required because it appears within the type `alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>`
 --> $RUST/alloc/src/sync.rs
  |
  | struct ArcInner<T: ?Sized> {
  |        ^^^^^^^^
  = note: required for `NonNull<alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>>` to implement `UnwindSafe`
note: required because it appears within the type `std::sync::Weak<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>`
 --> $RUST/alloc/src/sync.rs
  |
  | pub struct Weak<
  |            ^^^^
note: required because it appears within the type `WeakLua`
 --> src/state.rs
  |
  | pub struct WeakLua(XWeak<ReentrantMutex<RawLua>>);
  |            ^^^^^^^
note: required because it appears within the type `mlua::types::value_ref::ValueRef`
 --> src/types/value_ref.rs
  |
  | pub struct ValueRef {
  |            ^^^^^^^^
note: required because it appears within the type `LuaTable`
 --> src/table.rs
  |
  | pub struct Table(pub(crate) ValueRef);
  |            ^^^^^
note: required because it's used within this closure
 --> tests/compile/ref_nounwindsafe.rs:8:18
  |
8 |     catch_unwind(move || table.set("a", "b").unwrap());
  |                  ^^^^^^^
note: required by a bound in `std::panic::catch_unwind`
 --> $RUST/std/src/panic.rs
  |
  | pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
  |                                        ^^^^^^^^^^ required by this bound in `catch_unwind`

error[E0277]: the type `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
 --> tests/compile/ref_nounwindsafe.rs:8:18
  |
8 |     catch_unwind(move || table.set("a", "b").unwrap());
  |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<usize>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
  |     |
  |     required by a bound introduced by this call
  |
  = help: within `alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<usize>`
note: required because it appears within the type `Cell<usize>`
 --> $RUST/core/src/cell.rs
  |
  | pub struct Cell<T: ?Sized> {
  |            ^^^^
note: required because it appears within the type `lock_api::remutex::RawReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId>`
 --> $CARGO/lock_api-$VERSION/src/remutex.rs
  |
  | pub struct RawReentrantMutex<R, G> {
  |            ^^^^^^^^^^^^^^^^^
note: required because it appears within the type `lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>`
 --> $CARGO/lock_api-$VERSION/src/remutex.rs
  |
  | pub struct ReentrantMutex<R, G, T: ?Sized> {
  |            ^^^^^^^^^^^^^^
note: required because it appears within the type `alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>`
 --> $RUST/alloc/src/sync.rs
  |
  | struct ArcInner<T: ?Sized> {
  |        ^^^^^^^^
  = note: required for `NonNull<alloc::sync::ArcInner<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>>` to implement `UnwindSafe`
note: required because it appears within the type `std::sync::Weak<lock_api::remutex::ReentrantMutex<parking_lot::raw_mutex::RawMutex, parking_lot::remutex::RawThreadId, mlua::state::RawLua>>`
 --> $RUST/alloc/src/sync.rs
  |
  | pub struct Weak<
  |            ^^^^
note: required because it appears within the type `WeakLua`
 --> src/state.rs
  |
  | pub struct WeakLua(XWeak<ReentrantMutex<RawLua>>);
  |            ^^^^^^^
note: required because it appears within the type `mlua::types::value_ref::ValueRef`
 --> src/types/value_ref.rs
  |
  | pub struct ValueRef {
  |            ^^^^^^^^
note: required because it appears within the type `LuaTable`
 --> src/table.rs
  |
  | pub struct Table(pub(crate) ValueRef);
  |            ^^^^^
note: required because it's used within this closure
 --> tests/compile/ref_nounwindsafe.rs:8:18
  |
8 |     catch_unwind(move || table.set("a", "b").unwrap());
  |                  ^^^^^^^
note: required by a bound in `std::panic::catch_unwind`
 --> $RUST/std/src/panic.rs
  |
  | pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
  |                                        ^^^^^^^^^^ required by this bound in `catch_unwind`