Commit graph

952 commits

Author SHA1 Message Date
Alex Orlenko 4fc69be5f6
Update rustyline dev dependency 2022-07-25 14:14:01 +01:00
Alex Orlenko 3ec076693a
Add FAQ 2022-07-24 11:59:04 +01:00
Alex Orlenko 95adf8df8e
Add __iter to destructed metatable (luau) 2022-07-24 11:55:36 +01:00
Alex Orlenko 4a25eab257
Merge pull request #189 from hack3ric/master
`Function::bind`: simply clone the function if args are empty `MultiValue`
2022-07-22 00:28:18 +01:00
Alex Orlenko 40fe937878
Fix a bug in Function::bind when args and binds are empty
This leads to a Lua assertion due to using wrong stack index
2022-07-22 00:24:53 +01:00
Eric Long a6b178328d
Merge branch 'master' of https://github.com/hack3ric/mlua 2022-07-21 20:55:28 +08:00
Eric Long f3f173fcb6
Function::bind: simply clone the function if args are empty MultiValue 2022-07-21 20:54:49 +08:00
Alex Orlenko d3b48cf2f3
Use Luau tags to mark userdata objects as destructed 2022-07-18 10:38:22 +01:00
Alex Orlenko f9ff6116db
Use MaybeUninit instead of hack in protect_lua_closure 2022-07-17 11:33:51 +01:00
Alex Orlenko f75af6d75f
Fix clippy warnings 2022-07-17 11:11:30 +01:00
Alex Orlenko 059e41bafb
Optimize WrappedFailure userdata detection.
This is done by comparing a metatable pointer to previously saved one (it never changes).
2022-07-17 11:00:46 +01:00
Alex Orlenko f7ee6dc635
Add lua_xpush to 5.1-5.4 2022-07-17 11:00:46 +01:00
Alex Orlenko 0919ff21c9
Merge pull request #181 from hack3ric/master
Add `MultiValue::get` & add clear error in `Index`
2022-07-01 10:10:16 +01:00
Eric Long 553251761f
Add MultiValue::get & add clear error in Index 2022-07-01 01:59:40 +08:00
Alex Orlenko b46b476f80
v0.8.1 2022-06-29 15:41:22 +01:00
Alex Orlenko 70e16b51ae
Set source name to full file path in Luau require 2022-06-29 11:25:16 +01:00
Alex Orlenko 9596b97faa
Update Lua::create_userdata doc about sharing metatable.
Closes #175
2022-06-29 00:25:26 +01:00
Alex Orlenko 8cbb3d8fae
Merge pull request #180 from khvzak/userdata_proxy
Add Lua::create_proxy for easy access to UserData static fields and f…
2022-06-29 00:05:59 +01:00
Alex Orlenko e7f494530f
Add Lua::create_proxy for easy access to UserData static fields and functions
Closes #178
2022-06-28 23:03:29 +01:00
Alex Orlenko 3746c3614f
Merge pull request #179 from hack3ric/master
Implement utilities for MultiValue
2022-06-28 22:56:28 +01:00
Alex Orlenko 9af1aaf889
Make clippy happy 2022-06-28 21:28:48 +01:00
Eric Long c20eb20a59
Implement utilities for MultiValue 2022-06-29 01:21:32 +08:00
Alex Orlenko 04ba93137c
Add Table::to_pointer() and String::to_pointer() functions 2022-06-27 14:58:48 +01:00
Alex Orlenko 113f91ace3
Derive Default for Lua::MemoryInfo 2022-06-27 13:57:15 +01:00
Alex Orlenko ff0d923aae
Don't use custom allocator for non-vendored LuaJIT (fixes #176) 2022-06-27 13:04:32 +01:00
Alex Orlenko d9ac7abff2
v0.8.0 2022-06-08 23:57:35 +01:00
Alex Orlenko 48aa97351d
Add Sandboxing section to README 2022-06-08 23:56:26 +01:00
Alex Orlenko 4516ca0bb5
Forgotten part of userdata performance optimization for Lua 5.1 2022-06-07 17:59:22 +01:00
Alex Orlenko 9005f32a98
Add ffi::luau::lua_tolightuserdata introduced in Luau 0.528 2022-06-06 22:40:29 +01:00
Alex Orlenko 93d36b9068
More performance optimization (userdata part) 2022-06-06 21:42:55 +01:00
Alex Orlenko f9f32bffce
Update bundled luau/jit versions 2022-06-06 15:59:28 +01:00
Alex Orlenko da5010e6de
Switch to 2021 edition and bump MSRV to 1.56+ 2022-06-06 15:40:29 +01:00
Alex Orlenko 4afca8f5bb
Prepare for v0.8.0 release 2022-06-02 22:44:07 +01:00
Alex Orlenko b065db37c2
Always use Rust allocator for Lua 5.1/u 2022-05-31 02:09:58 +01:00
Alex Orlenko a100ebb3d7
Fix luaL_requiref glb handling for Lua<=5.1 2022-05-30 21:45:25 +01:00
Alex Orlenko a05a58b258
Update integer/number coercion logic 2022-05-30 19:26:12 +01:00
Alex Orlenko 3766cee4dd
Experimental optimization to skip oom check 2022-05-30 18:42:34 +01:00
Alex Orlenko 99becdb590
More inline attributes 2022-05-29 20:17:09 +01:00
Alex Orlenko 799b4e9f0d
Make Variadic::new and MultiValue::new const 2022-05-28 21:13:49 +01:00
Alex Orlenko 93f0b2a5de
Update type of lua_Integer for lua51/52 2022-05-27 12:26:56 +01:00
Alex Orlenko 62db3adde1
Add "send" test 2022-05-26 22:22:23 +01:00
Alex Orlenko afa343ff08
Add [track_caller] attribute when working with app data container 2022-05-26 20:16:09 +01:00
Alex Orlenko 4f06f614a9
v0.8.0-beta.5 2022-05-25 01:47:38 +01:00
Alex Orlenko 30ba616a8a
Correctly deserialize newtype struct (#168) 2022-05-24 23:26:17 +01:00
Alex Orlenko 0076aa735a
Add Function::coverage for Luau to obtain coverage report 2022-05-24 02:01:46 +01:00
Alex Orlenko bcf2cbea37
Add Value::to_pointer() function.
Closes #165 and #166.
2022-05-18 13:15:08 +01:00
Alex Orlenko 8cd594c609
Fix typo 2022-05-18 12:15:39 +01:00
Alex Orlenko 8d71ea79aa
Cache bytecode for internal Lua chunks 2022-05-16 20:29:02 +01:00
Alex Orlenko 2a8c5c7f82
Refactor Function::bind implementation.
Make it possible to bind async function arguments.
Fixes #161
2022-05-15 01:15:31 +01:00
Alex Orlenko 6b2ceb60c4
Fix Send impl 2022-05-12 19:24:12 +01:00