rlua 0.16.3

High level bindings to Lua 5.3
Documentation
extern crate rlua;

use rlua::Lua;

fn main() {
    struct Test {
        field: i32,
    }

    Lua::new().context(|lua| {
        lua.scope(|scope| {
            let f = {
                let mut test = Test { field: 0 };

                scope
                    .create_function_mut(|_, ()| {
                        test.field = 42;
                        //~^ error: `test` does not live long enough
                        Ok(())
                    })
                    .unwrap()
            };

            f.call::<_, ()>(()).unwrap();
        });
    });
}