rua is a Lua implementation written in Rust.
It aims to provide a safe, modern, and flexible Lua runtime and tooling, without depending on the original C libraries.
- Lua API for Rust
- Lua API for C/C++
- Lua Interpreter (
rua
) with REPL and version switching - Lua Compiler (
ruac
) with bytecode disassembly and version switching
The rua
command provides a Lua interpreter with a rich REPL experience and version switching.
$ rua
In[0]: print("hello rua")
Out[0]: hello rua
In[0]: %ls
Out[0]: .gitignore README.md function.lua ...
In[1]: %who
Out[1]: a b c my_function
$ rua script.lua
rua --lua51 script.lua
rua --luajit script.lua
- Using original API implemented C
rua
provide C/C++ API
mlua
provides Lua API, but depend on several C Library.rua
provides Lua API, *no depend on C Library
not yet measured
Lua version and dialect | mlua |
rua |
---|---|---|
lua51 |
Supported | Planned |
lua52 |
Supported | Planned |
lua53 |
Supported | Planned |
lua54 |
Supported | Planned |
luajit |
Supported | Planned |
luajit52 |
Supported | Planned |
luau |
Supported | Planned |
Feature for emebedding in Rust | mlua |
rua |
---|---|---|
async/await |
Supported | Planned |
send |
Supported | Planned |
error-send |
Supported | Planned |
serde |
Supported | Planned |
macros |
Supported | Planned |
anyhow |
Supported | Planned |
userdata-wrappers |
Supported | Planned |