Commit Graph

  • 4977b91a98 Detect compilation error and return Result when using Compiler::compile() interface. Closes #387 Alex Orlenko 2024-08-25 23:04:22 +01:00
  • 6317b8e0c8 Test GC for nested userdata (userdata in userdata) Alex Orlenko 2024-08-25 21:02:12 +01:00
  • ecc09c4387 Add luaL_loadbufferenv helper to all Lua versions Alex Orlenko 2024-08-25 17:29:58 +01:00
  • 7bfd32750d Change chunk env to use luau's load env parameter (#442) bjcscat 2024-08-25 10:50:41 -05:00
  • 23d4e2519b Switch to Mutex from RwLock for userdata access in send mode. Unfortunately RwLock allow access to the userdata from multiple threads without enforcing Sync marker. Alex Orlenko 2024-08-24 09:22:21 +01:00
  • 2857cb76c6 Add A param to AsyncThread<A, R>. This reduces internal dependency on MultiValue container and delay args conversion to the future poll() stage. Alex Orlenko 2024-08-23 00:19:55 +01:00
  • fdc50bffc9 Fix memory leak when polling async futures Alex Orlenko 2024-08-23 01:03:54 +01:00
  • 9931709ecd Remove explicit lifetime from UserDataMethods and UserDataFields traits. Pass 'static arguments to async functions and require 'static Future. (in future we can use async closures to make it more elegant). Alex Orlenko 2024-08-23 00:05:24 +01:00
  • 8092f00930 Do not require Lua to be alive when dropping AsyncThread Alex Orlenko 2024-08-10 22:57:42 +01:00
  • d2e87943ac Skip extra lock when resuming thread Alex Orlenko 2024-08-10 22:55:29 +01:00
  • 26b9bdb362 serde_userdata: Remove map_err to reduce compile time impact (#441) Sven Niederberger 2024-08-21 13:06:49 +02:00
  • c58f67b140 Add MaybeSend requirement to Lua futures Alex Orlenko 2024-08-10 17:55:04 +01:00
  • 0c08cdaf7c Reduce compile time contribution of next_key_seed and next_value_seed (#436) Sven Niederberger 2024-08-06 21:04:17 +02:00
  • 10999babe0 Replace MultiValue::extend_from_values with from_lua_iter Alex Orlenko 2024-08-06 01:32:20 +01:00
  • f0a995a357 Make MultiValue::with_capacity public Alex Orlenko 2024-08-05 23:36:17 +01:00
  • aa47324ee9 Use pool for MultiValue container Alex Orlenko 2024-08-05 21:34:51 +01:00
  • ac6a391426 Remove Lua::into_static and Lua::from_static (undocumented). Alex Orlenko 2024-08-05 14:57:15 +01:00
  • 8e14b6e40b Fix tests Alex Orlenko 2024-08-04 22:22:02 +01:00
  • c117a4c1af Fix loading (fetching) stdlib modules when using require in Luau. Fixes #435. Alex Orlenko 2024-08-04 18:55:17 +01:00
  • 4082b354fe clippy Alex Orlenko 2024-07-31 23:51:20 +01:00
  • 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> Alex Orlenko 2024-07-31 23:42:43 +01:00
  • b7d170ab9b Refactor ThreadStatus: - Add ThreadStatus::Running - Replace ThreadStatus::Unresumable with ThreadStatus::Finished Change Error::CoroutineInactive to Error::CoroutineUnresumable Alex Orlenko 2024-07-31 22:34:45 +01:00
  • 5acf9d758d Update CHANGELOG for v0.10.0-beta.1 v0.10.0-beta.1 Alex Orlenko 2024-07-31 13:10:39 +01:00
  • 833790967b Update async examples (use send feature) Alex Orlenko 2024-07-31 12:10:23 +01:00
  • a86d6ab330 Mark LightUserData as Send+Sync (send feature flag) Alex Orlenko 2024-07-31 11:13:48 +01:00
  • 2f8755dcc7 Update README Alex Orlenko 2024-07-31 10:57:26 +01:00
  • 94415065c0 Fix Lua String soundness when borrowing &str or &[u8]. Make borrowing using new BorrowedStr and BorrowedBytes types that holds strong reference to Lua. Alex Orlenko 2024-07-30 23:59:29 +01:00
  • bba644e83f Fix compilation Alex Orlenko 2024-07-29 10:49:34 +01:00
  • d5173380e3 Split util module Refactor internal userdata types to switch to the new TypeKey trait Alex Orlenko 2024-07-29 10:37:22 +01:00
  • d9941ef409 Take &mut RegistryKey in Lua::replace_registry_value. Alex Orlenko 2024-07-10 23:17:00 +01:00
  • c715aec1f7 Do not consume self in Table::pairs and Table::sequence_values methods. Alex Orlenko 2024-07-10 23:09:54 +01:00
  • cd3f45f31f Rust nightly rustfmt Alex Orlenko 2024-07-10 22:46:37 +01:00
  • b4892c228c Add rustfmt.toml Alex Orlenko 2024-07-10 22:46:02 +01:00
  • 7a75c73052 Move AppData to types::app_data mod Alex Orlenko 2024-07-08 23:10:28 +01:00
  • 658f2a13ea Support multi threads under send feature flag Alex Orlenko 2024-07-08 13:14:28 +01:00
  • c1395ab543 clippy Alex Orlenko 2024-07-08 01:00:06 +01:00
  • cd6d86a5ce Split single lua module to multiple submodules under state Alex Orlenko 2024-07-08 00:36:29 +01:00
  • 8b2d067196 Fix Lua::set_vector_metatable Alex Orlenko 2024-07-02 23:45:45 +01:00
  • 07a5538e50 Don't run destructors if Lua is gone Alex Orlenko 2024-07-02 23:42:41 +01:00
  • d17dc54645 Rewrite call_async in traits to use impl Future instead of LocalBoxFuture. More use std::future types instead of future-utils. Alex Orlenko 2024-06-25 17:59:17 +01:00
  • baa8895cfb Optimize creation of userdata callbacks (registry) Alex Orlenko 2024-06-25 12:17:33 +01:00
  • 550d6b2991 Remove wrapped UserData impl (Rc/Arc/etc) Alex Orlenko 2024-06-25 00:09:38 +01:00
  • b3649a44e0 Move userdata-related top-level modules into the userdata module Alex Orlenko 2024-06-24 23:49:10 +01:00
  • 313117095c Remove parking_lot feature flag Alex Orlenko 2024-06-24 22:52:15 +01:00
  • 7221051683 Refactor: - Remove the rest of 'lua lifetimes - Remove Owned types Alex Orlenko 2024-06-02 00:51:24 +01:00
  • 1eb2ecb3b0 Drop lifetime from IntoLua Alex Orlenko 2024-05-18 01:03:25 +01:00
  • 24b0672d99 Rename LuaRef to ValueRef Alex Orlenko 2024-03-02 23:07:14 +00:00
  • 08c7429531 Optimize various parts of the code to remove unnecessary clone calls. This is became possible after implementing IntoLua for references. Alex Orlenko 2024-03-02 17:16:32 +00:00
  • aa05eb4c81 Switch MultiValue to use VecDeque under the hood. Alex Orlenko 2024-03-02 17:00:23 +00:00
  • 4aa178fcc0 Take &Value in Lua::push_value() Alex Orlenko 2024-03-02 16:10:48 +00:00
  • 98ca880f8a Change Value::Error variant to store Box<Error> instead of Error. This will help to reduce size of Value enum on the stack. Alex Orlenko 2024-03-02 10:56:30 +00:00
  • fe21ef43ba Replace AtomicPtr with Cell Alex Orlenko 2024-02-29 23:26:04 +00:00
  • 7d3704c222 mlua-sys: v0.6.2 v0.9 Alex Orlenko 2024-07-25 22:46:03 +01:00
  • 496c8fa0e9 Fix references to master branch Alex Orlenko 2024-07-25 22:49:32 +01:00
  • 9ce0e11518 Use Lua 5.4.7 Alex Orlenko 2024-07-25 22:45:40 +01:00
  • b77836920a Link to other mlua projects published to LuaRocks (#425) Caleb Maclennan 2024-07-05 01:31:05 +03:00
  • f1ceaf0ff1 v0.9.9 v0.9.9 Alex Orlenko 2024-06-18 11:13:04 +01:00
  • 884a025b52 Fix some clippy warnings Alex Orlenko 2024-06-18 12:13:49 +01:00
  • c23fa5aa6c Optimize RegistryKey internals - Store single AtomicI32 field instead of pair i32,AtomicBool - Make creation faster by skipping intermediate Value layer Add new RegistryKey::id() method to return underlying identifier Alex Orlenko 2024-06-18 15:15:07 +01:00
  • 4f1d2abbcb Bump rustc-hash to 2.0 Alex Orlenko 2024-06-18 11:18:55 +01:00
  • a25e81036e Do not allow already running coroutines to be reset or resumed. This is a wrong use of the Lua API and is not supported. See #416 for the reference. Alex Orlenko 2024-06-12 23:18:46 +01:00
  • b46cad1db1 Support Luau v0.629 Alex Orlenko 2024-06-09 00:37:58 +01:00
  • f2d48ce296 v0.9.8 v0.9.8 Alex Orlenko 2024-05-15 23:17:30 +01:00
  • 0fa39d431d mlua_derive: v0.9.3 Alex Orlenko 2024-05-15 23:14:08 +01:00
  • 0aa86c4d47 Update CHANGELOG Alex Orlenko 2024-05-15 23:11:50 +01:00
  • ea2faa3755 clippy Alex Orlenko 2024-05-15 23:11:33 +01:00
  • 59c9abbac7 Fix serializing same table multiple times. Fixes #408 Alex Orlenko 2024-05-14 00:41:21 +01:00
  • 8f3de8aa19 mlua-sys: v0.6.0 Alex Orlenko 2024-05-04 21:22:17 +01:00
  • 317ce7caa6 Add Lua::set_fflag() to control Luau feature flags Alex Orlenko 2024-05-04 21:15:22 +01:00
  • 3a44729a48 Mark lua_Callbacks as non exhaustive (Luau) Alex Orlenko 2024-05-04 21:11:29 +01:00
  • 3d46fad459 Update luau-src to v0.9 Mark lua_CompileOptions as non exhaustive Alex Orlenko 2024-05-04 21:10:24 +01:00
  • ffc4bd599c Fix module imports for export (#394) Joris Willems 2024-04-18 11:22:41 +02:00
  • 1c969da286 update build script to fix cross compilation of windows dlls from unix (#397) Eric Stokes 2024-04-17 15:29:41 -04:00
  • 45fd2fa40a mlua-sys: v0.5.2 Alex Orlenko 2024-04-05 14:04:15 +01:00
  • 806bd202d6 v0.9.7 v0.9.7 Alex Orlenko 2024-04-05 12:18:21 +01:00
  • a644049087 Cosmetic changes for clippy Alex Orlenko 2024-04-05 12:42:45 +01:00
  • ad31bed1db Minor improvements in serializing: Use &str instead of creating Lua string when serializing tuple variant and struct variant Alex Orlenko 2024-04-05 12:32:14 +01:00
  • 62f0bb97b0 Add Lua::create_ser_any_userdata() function Alex Orlenko 2024-04-05 12:03:40 +01:00
  • f67f8646ae Implement push_into_stack/from_stack for Option<T> Alex Orlenko 2024-03-28 18:18:08 +00:00
  • fa217d3706 Better Luau buffer type support. - Add Lua::create_buffer() function - Support serializing buffer type as a byte slice - Support accessing copy of underlying bytes using BString Alex Orlenko 2024-03-28 13:05:01 +00:00
  • b62f2ee0f7 chore: make clippy happy (#388) Yiyu Lin 2024-03-25 21:26:06 +08:00
  • 6e6c73e4c7 Add deserialize json benchmark Alex Orlenko 2024-03-23 22:30:59 +00:00
  • 508517c45e Do not use dependencies as implicit features. Add dep: prefix instead. Alex Orlenko 2024-03-23 19:47:42 +00:00
  • a79840afc9 Suppress Rust 1.77 dead_code false warnings. Alex Orlenko 2024-03-23 11:42:46 +00:00
  • 39afe4c6f7 Add SerializeOptions::detect_serde_json_arbitrary_precision to detect serde_json::Number with arbitrary_precision and convert it to Lua number. By default the option is disabled and such numbers represented as Lua objects with $serde_json::private::Number key. Fixes #385 Alex Orlenko 2024-03-23 11:00:16 +00:00
  • 038cc5f974 Bump rustyline to 14.0 Alex Orlenko 2024-03-22 00:40:07 +00:00
  • 59b14000f3 Update hyper examples Alex Orlenko 2024-03-22 00:30:29 +00:00
  • 849206ef9d update hyper to v1, and add shell command example (#384) 19年梦醒 2024-03-22 07:06:00 +08:00
  • 80fff4f2e7 Update reqwest to 0.12 Alex Orlenko 2024-03-21 22:29:34 +00:00
  • 9734146313 Add Function::deep_clone() (Luau only) Alex Orlenko 2024-03-21 22:11:49 +00:00
  • 58be624222 Remove redundant "match" when checking userdata type via AnyUserData::is. Fixes #386 Alex Orlenko 2024-03-20 19:29:47 +00:00
  • 3d43103431 Make __idiv metamethod available for luau Closes #383 Alex Orlenko 2024-03-20 19:20:05 +00:00
  • 5a22437d5f Assert that luau_compile returns non-null pointer. Fixes #381 Alex Orlenko 2024-03-16 23:39:10 +00:00
  • 83c075c72b Implement IntoLua for RegistryKey Alex Orlenko 2024-02-29 22:45:23 +00:00
  • 270b98a429 v0.9.6 v0.9.6 Alex Orlenko 2024-02-29 15:39:14 +00:00
  • 0ee3324462 Add LUA_TCDATA to util::to_string() helper Alex Orlenko 2024-02-29 12:56:54 +00:00
  • 8a9c4f0b15 Optimize table array traversal during serialization Alex Orlenko 2024-02-11 23:02:36 +00:00
  • 34db5f985e Refactor benchmarks Alex Orlenko 2024-02-11 00:35:30 +00:00
  • 020e8a78a8 Impl FromLua for RegistryKey Alex Orlenko 2024-02-10 15:41:48 +00:00
  • 3ca7b4942e Implement IntoLua for &Value Alex Orlenko 2024-02-04 14:18:04 +00:00