Crates.io | luar |
lib.rs | luar |
version | 0.1.1 |
source | src |
created_at | 2023-06-10 06:39:18.913699 |
updated_at | 2023-06-10 08:01:36.641708 |
description | Luar is a Lua interpreter implemented in Rust |
homepage | |
repository | https://github.com/sunray-ley/luar |
max_upload_size | |
id | 886761 |
size | 6,000 |
Luar is a Lua interpreter implemented in Rust. It aims to provide a high-performance, reliable interpreter that supports as many Lua features as possible.
Basic capabilities for parsing, compiling, and executing Lua code
Highly configurable with support for custom Lua standard libraries
Purely implemented in Rust, providing high performance and safety guarantees
Easy to embed into Rust applications
To use Luar, you need to have Rust programming language and Cargo package manager installed. Please refer to Rust's official website for installation instructions.
Use the following command in the terminal to install Luar:
$ cargo install luar
If you want to run an interactive Lua shell, execute the following command:
$ luar
To run a Lua script, execute the following command:
$ luar script.lua
You can also integrate Luar into your own Rust projects. Add the following dependency in your Cargo.toml
file:
[dependencies]
luar = "0.1"
In your Rust code, use the following code to load and run a Lua script:
use luar::State;
fn main() {
let mut lua = State::new();
lua.load("print('Hello, world!')").exec().unwrap();
}
Refer to the documentation for more detailed explanations.
Contributions to Luar are welcome! If you have any suggestions or questions, please open an issue or pull request on GitHub.
Luar is distributed under the MIT License. Please refer to the LICENSE file for more information.