60 releases

0.20.1 Jul 20, 2024
0.20.0 Feb 7, 2024
0.19.8 Jan 21, 2024
0.19.7 Jul 2, 2023
0.8.2 Jul 9, 2017

#12 in #mlua

Download history 1788/week @ 2024-08-25 882/week @ 2024-09-01 762/week @ 2024-09-08 723/week @ 2024-09-15 1043/week @ 2024-09-22 1442/week @ 2024-09-29 402/week @ 2024-10-06 622/week @ 2024-10-13 593/week @ 2024-10-20 641/week @ 2024-10-27 523/week @ 2024-11-03 355/week @ 2024-11-10 438/week @ 2024-11-17 680/week @ 2024-11-24 789/week @ 2024-12-01 1084/week @ 2024-12-08

3,036 downloads per month
Used in 70 crates (48 directly)

MIT license

35KB
75 lines

rlua -- High level bindings between Rust and Lua

rlua is now deprecated in favour of mlua: see below for migration information

rlua is now a thin transitional wrapper around mlua; it is recommended to use mlua directly for new projects and to migrate to it when convenient. mlua was a fork of rlua which has recently seen more development activity and new features.

Migration

rlua 0.20 includes some utilities to help transition to mlua, but is otherwise just re-exporting mlua directly.

The main changes are:

  • In mlua, Lua::context() is no longer necessary. The methods previously on Context can now be called directly on the Lua object. rlua 0.20 includes an RluaCompat extension trait which adds a context() method which can be used to avoid having to update code all at once.

  • The ToLua trait has been renamed to IntoLua, and its conversion method to_lua is now into_lua. rlua 0.20 includes ToLua as an alias for IntoLua and an extension ToLuaCompat which adds a to_lua method as a temporary convenience.

A few other changes which should be less disruptive:

  • mlua has different defaults and options for blocking loading C libraries or compiled modules from Lua code or catching Rust panics. Check the Lua::new_with and unsafe variants for the new options.

Dependencies

~4.5–7.5MB
~131K SLoC