Commit Graph

  • 8d864e2687 Reduce stack operations when creating userdata Alex Orlenko 2025-03-22 14:23:34 +00:00
  • b0140cdb9e Add Chunk::name(), Chunk::environment() and Chunk::mode() functions. They can be used to retrieve existing chunk params. Alex Orlenko 2025-03-22 00:17:28 +00:00
  • 806817212e Rename Lua::init_from_ptr to Lua::get_or_init_from_ptr. Return reference to &Lua with unbound lifetime (chosen by user). Alex Orlenko 2025-03-21 21:28:30 +00:00
  • 95c623e94d Use c string literal where appropriate Alex Orlenko 2025-03-21 15:36:32 +00:00
  • 0a1a1fe0b6 Move some userdata helpers from crate::util to crate::userdata::util Alex Orlenko 2025-03-21 15:11:09 +00:00
  • 4fe7d151a1 Refactor userdata-wrappers feature. Support borrowing underlying data in UserDataRef and UserDataRefMut. Alex Orlenko 2025-03-21 12:29:47 +00:00
  • edbf1e9150 Change Lua library name constants from &str to *const c_char. It makes easier to pass them to Lua API functions. Alex Orlenko 2025-03-14 23:10:14 +00:00
  • 69011a89d2 Revert "Add initial pluto support" Alex Orlenko 2025-03-14 22:59:06 +00:00
  • 0ed11e4134 Add initial pluto support Pluto is a superset of Lua 5.4 with a focus on general-purpose programming. pluto feature also enables lua54 feature since they are compatible and share the same API. Alex Orlenko 2025-03-14 11:38:07 +00:00
  • 0ce599aff2 Update test case Alex Orlenko 2025-03-13 17:41:13 +00:00
  • 1ebb4b468a Support 52-bit integers for Luau Simply to float conversion (it actually never fails or goes out of range) Alex Orlenko 2025-03-13 16:18:44 +00:00
  • 5ab97666d7 Fix clippy warnings Alex Orlenko 2025-03-07 21:21:14 +00:00
  • e706ae4fcb Remove Roblox from references to Luau Closes #537 Alex Orlenko 2025-02-24 19:03:33 +00:00
  • ae7cdcb934 Remove (internal) borrow counter and use instead "locked" flag and strong reference counter Alex Orlenko 2025-02-14 14:41:37 +00:00
  • dacddfa967 Add Variadic to prelude Alex Orlenko 2025-02-14 12:06:25 +00:00
  • a01b032c35 Add bstr/serde dependency if serialize feature flag is enabled Alex Orlenko 2025-02-11 13:36:03 +00:00
  • 18497f1528 Add library constants support for Luau compiler. Alex Orlenko 2025-02-11 00:06:03 +00:00
  • 28e8f56989 Fix tests Alex Orlenko 2025-02-09 22:17:25 +00:00
  • c1f8abba9e Do not allow recursive warnings (Lua 5.4) Alex Orlenko 2025-02-09 15:08:52 +00:00
  • d1a587f49a Wrap hooks in refcounter instead of box, same as previously. This allows to obtain independent clone of closure. Ensure that stack is always clean when running thread hook. Alex Orlenko 2025-02-08 22:09:59 +00:00
  • 5bbd23ed1a Fix hook tests Alex Orlenko 2025-02-08 11:51:38 +00:00
  • 74b4601b48 Rework Lua hooks: - Support global hooks inherited by new threads - Support thread hooks, where each thread can have its own hook Alex Orlenko 2025-02-07 22:39:32 +00:00
  • a89800b949 Typos config and ci (#523) Joel Natividad 2025-02-05 14:02:48 -05:00
  • 2b6172ef38 Fix tests Alex Orlenko 2025-02-05 19:01:07 +00:00
  • 20f7ce097d Fix typos (#522) Joel Natividad 2025-02-05 11:16:20 -05:00
  • 6882e0434e Fix version number in changelog (#521) Andrew Farkas 2025-02-04 02:33:33 -05:00
  • fca38a6637 Imporove BorrowedStr/BorrowedBytes ergonomic. Implement FromLua and IntoLua for these types to allow working with them directly. Alex Orlenko 2025-01-30 23:07:02 +00:00
  • cdd6a99136 Support Thread::resume_error call (Luau) This method uses Luau-specific C API extension lua_resumerror that allow to throw an error immediately when resuming a thead. Closes #500 #513 Alex Orlenko 2025-01-28 22:55:45 +00:00
  • 21d39a069d Pass &Scope instead of &mut Scope to Lua::scope closure. It was a leftover from an experimental implementation that has been removed. Alex Orlenko 2025-01-28 18:23:18 +00:00
  • 58965c6255 Move lifetime from AsChunk<'a> to AsChunk::source Alex Orlenko 2025-01-28 18:17:29 +00:00
  • 8574682ffc Improve From/Into Lua char conversion Alex Orlenko 2025-01-28 10:41:10 +00:00
  • 47bc372096 impl FromLua/IntoLua for char (#516) tk 2025-01-28 10:10:28 +00:00
  • d376cb9403 Enable Thread::reset() for all Lua versions Alex Orlenko 2025-01-12 00:04:56 +00:00
  • ea5ecccf02 Change AsyncThread<A, R> to AsyncThread<R>. Push arguments in Thread::into_async() to the thread during the call instead of first poll. The pushed arguments will be automatically used on resume. Fixes #508 and relates to #500. Alex Orlenko 2025-01-11 22:03:32 +00:00
  • cf71edc492 Update README (set main branch for development) Alex Orlenko 2025-01-28 10:07:41 +00:00
  • 9caf3542d9 v0.10.3 v0.10.3 Alex Orlenko 2025-01-27 21:33:51 +00:00
  • cb45db05fa Update README/CHANGELOG Alex Orlenko 2025-01-27 21:31:36 +00:00
  • d1cb2a9a96 mlua-sys: v0.6.7 Alex Orlenko 2025-01-27 21:20:47 +00:00
  • aa3f6ba46c Fix prototype of new Luau compiler options and methods Alex Orlenko 2025-01-27 21:19:31 +00:00
  • cc57bed4c8 Update Luau to 0.657 Alex Orlenko 2025-01-27 14:19:40 +00:00
  • b5d38ab2e3 Set Default for LuaValue to be nil. (#512) Radiant 2025-01-20 01:52:58 +02:00
  • cd4091f64d Allow exhaustive match on Value. It was not possible because ValueRef variant in Value::Other was private. Closes #502 and #503 Alex Orlenko 2024-12-10 23:35:39 +00:00
  • 91e069a77e Optimize (and simplify) protected mode for Rust function calls Alex Orlenko 2024-12-07 00:04:12 +00:00
  • cacd3dc70f Add Table::set_safeenv method (Luau) Alex Orlenko 2024-12-04 10:40:49 +00:00
  • 6f6cda0099 v0.10.2 v0.10.2 Alex Orlenko 2024-12-01 13:04:06 +00:00
  • d51ce86142 mlua-sys: v0.6.6 Alex Orlenko 2024-12-01 12:56:39 +00:00
  • aa061bce6f mlua_derive: v0.10.1 Alex Orlenko 2024-12-01 12:55:50 +00:00
  • 1c6b6ad801 Fix tests Alex Orlenko 2024-12-01 02:11:12 +00:00
  • 031854fa2a Switch proc-macro-error to proc-macro-error2 (#493) Evie 2024-11-30 17:37:40 -05:00
  • 5fd96c7908 Don't run GC finalizers on ref thread. If this happen then we don't have full access to the ref thread stack. Fixes #491 Alex Orlenko 2024-11-30 00:57:17 +00:00
  • 7a3f19b857 Ensure that buffer with Luau compiled code is always freed Alex Orlenko 2024-11-29 13:36:51 +00:00
  • 55a5d7ef10 Protect Lua(u) during chunk loading if memory limit is enforced Relates to #488 Alex Orlenko 2024-11-27 00:32:37 +00:00
  • af31dbd180 Use c string literal in few places Alex Orlenko 2024-11-25 22:53:59 +00:00
  • 9ae3cb0a7c Add doc about possible chunk name prefixes Alex Orlenko 2024-11-24 12:00:01 +00:00
  • fc1c80c142 Mark Chunk::wrap as non-public Alex Orlenko 2024-11-22 20:03:17 +00:00
  • ee7ced6334 Add Chunk::wrap method Alex Orlenko 2024-11-22 14:40:52 +00:00
  • d8307d0e4c Reduce visibility of Wrapped* structs Alex Orlenko 2024-11-22 13:08:47 +00:00
  • bf9fcc5aca Simplify WrappedString Alex Orlenko 2024-11-22 13:06:50 +00:00
  • 7ce6b97da9 Add String::wrap method to wrap arbitrary AsRef<[u8]> Alex Orlenko 2024-11-22 11:48:20 +00:00
  • 4891a6ac10 Fix utf-8 test when bstr v1.11 switchted to LowerHex Alex Orlenko 2024-11-17 18:01:05 +00:00
  • 4ef0d583fc impl Send for UserDataTypeId (in send mode) Alex Orlenko 2024-11-16 01:56:10 +00:00
  • 30b0122f5d Make build script work with OpenBSD cos 2024-11-12 19:00:38 +01:00
  • c31c72076f Make build script work with FreeBSD cos 2024-06-19 15:32:58 +02:00
  • 3bfaee4ecc Delay "any" userdata metatable creation until first instance Alex Orlenko 2024-11-16 01:47:04 +00:00
  • 89b68e2a24 Remove generic from RawLua::push_userdata_metatable. This should help to reduce amount of generated code. Alex Orlenko 2024-11-16 01:44:17 +00:00
  • cbf805f492 Avoid ptr->usize->ptr conversion to comply strict provenance Alex Orlenko 2024-11-15 21:47:19 +00:00
  • c926327a6a v0.10.1 v0.10.1 Alex Orlenko 2024-11-09 14:43:02 +00:00
  • 7c099500d0 mlua-sys: v0.6.5 Alex Orlenko 2024-11-09 14:30:33 +00:00
  • 8c889cc353 Add String::display method Alex Orlenko 2024-11-09 14:24:43 +00:00
  • 958abd050e Update String::to_string_lossy doc Alex Orlenko 2024-11-09 14:10:45 +00:00
  • 92a8203e1c Fix formatting Alex Orlenko 2024-11-09 13:58:06 +00:00
  • b34b90eca3 Fix wrong formatting table with string keys that are numbers Alex Orlenko 2024-11-09 13:51:55 +00:00
  • 7aad0adcb4 Update links to luau.org Alex Orlenko 2024-11-09 12:48:15 +00:00
  • a3cd25db7a Support Luau 0.650 native vector library Alex Orlenko 2024-11-09 12:44:00 +00:00
  • a4bfeb7752 clippy Alex Orlenko 2024-11-09 12:38:05 +00:00
  • 0fda512938 feat(table): improve pretty-printing for simple tables and lists (#478) vhyrro 2024-11-09 12:08:49 +00:00
  • 58e0661086 Merge Scope::attach_destructor into Scope::seal_userdata Alex Orlenko 2024-11-08 15:04:46 +00:00
  • c7094d470f Add Scope::create_any_userdata to create Lua objects from any non-static Rust types. Alex Orlenko 2024-11-07 19:43:21 +00:00
  • a7d0691e10 Add AnyUserData::destroy method Alex Orlenko 2024-11-07 16:12:20 +00:00
  • 05778fbe6f Don't store and use wrong main Lua state in module mode (Lua 5.1/JIT only). When mlua module is loaded from a non-main coroutine we store a reference to it to use later. If the coroutine is destroyed by GC we can pass a wrong pointer to Lua that will trigger a segfault. Instead, set main_state as Option and use current (active) state if needed. Relates to #479 Alex Orlenko 2024-11-04 15:48:22 +00:00
  • b34d67ec41 Update Luau to 0.650 (luau0-src 0.11.1) Alex Orlenko 2024-11-03 14:49:12 +00:00
  • 46ee7ea772 Update tarpaulin.toml Alex Orlenko 2024-11-03 12:54:21 +00:00
  • 15738dda1f Update tarpaulin.toml to include userdata-wrappers Alex Orlenko 2024-11-03 12:19:22 +00:00
  • 1f32754f05 Relax UserDataBorrowRef restrictions to allow recursive calls Alex Orlenko 2024-11-03 12:18:00 +00:00
  • c2eab173c5 Add userdata-wrappers feature This feature allow to opt into impl UserData for Rc<T>/Arc<T>/Rc<RefCell<T>>/Arc<Mutex<T>> where T: UserData Close #470 Alex Orlenko 2024-11-03 11:36:23 +00:00
  • bb311349ec Switch between shared and exclusive lock for UserDataRef depending if T: Sync or not. Alex Orlenko 2024-11-02 10:14:50 +00:00
  • 928e1d9221 Revert &Scope to &mut Scope Alex Orlenko 2024-10-31 18:41:13 +00:00
  • 5b8681dcf2 Add Scope::add_destructor to attach custom destructors Alex Orlenko 2024-10-31 14:35:21 +00:00
  • 4e9a17707b Fix tests Alex Orlenko 2024-10-31 09:23:03 +00:00
  • 6066089cc1 Skip setting Send/Sync in non-send mode for UserDataCell Alex Orlenko 2024-10-30 23:32:13 +00:00
  • a8d5f23818 Add Lua::try_app_data_ref and Lua::try_app_data_mut Alex Orlenko 2024-10-30 15:22:55 +00:00
  • 5ec4e0338a Add From<Vec> and Into<Vec> support to MultiValue and Variadic types Alex Orlenko 2024-10-30 12:58:34 +00:00
  • d27d1365b5 Update v0.10 release notes (add breaking changes) Alex Orlenko 2024-10-30 00:42:31 +00:00
  • 76b896edcc Fix attaching __gc metamethod Bug introdused in ddebf56 Alex Orlenko 2024-10-29 22:56:29 +00:00
  • ddebf56b41 Defer metatable return on userdata creation until the end Relates to #477 Alex Orlenko 2024-10-29 10:57:37 +00:00
  • 4f56575e05 v0.10.0 v0.10.0 Alex Orlenko 2024-10-25 12:57:21 +02:00
  • 35fa76263e Update docs Alex Orlenko 2024-10-25 10:59:36 +02:00
  • 446d63a77e More tests Alex Orlenko 2024-10-23 15:50:58 +01:00
  • 8d8d521721 Add error-send feature flag Alex Orlenko 2024-10-23 10:36:28 +01:00
  • 0d31a1caa6 Rename Error::MemoryLimitNotAvailable to Error::MemoryControlNotAvailable Alex Orlenko 2024-10-22 22:44:52 +01:00