Add actix-lua
to your Cargo.toml
:
toml
[dependencies]
actix-lua = "0.1"
You can define an actor with Lua, for example:
```rust extern crate actixlua; use actixlua::{LuaActor, LuaMessage};
fn main () { let system = System::new("test"); let addr = LuaActor::new(r#" function handle(msg) return msg + 42 end "#).unwrap().start();
let res = add.send(LuaMessage:from(123));
} ```
Since Lua is a dynamic typed language. We use one message type LuaMessage
to represent all types of message Lua can send/receive.
The MIT License