4 releases (2 stable)

new 1.0.1 May 27, 2024
1.0.0 May 26, 2024
0.0.2 May 7, 2024
0.0.1 May 7, 2024

#649 in Development tools

Download history 202/week @ 2024-05-02 35/week @ 2024-05-09 8/week @ 2024-05-16 279/week @ 2024-05-23

524 downloads per month

MIT license

785KB
88 lines

Contains (static library, 395KB) lua-5.4.6/liblua.a, (static library, 380KB) lua-5.4.0/liblua.a, (Mach-o exe, 25KB) lua-5.4.0/src/lapi.o, (Mach-o exe, 26KB) lua-5.4.0/src/lauxlib.o, (Mach-o exe, 19KB) lua-5.4.0/src/lcode.o, (Mach-o exe, 20KB) lua-5.4.0/src/liolib.o and 62 more.

RCLua

Crates.io Version docs.rs GitHub License

RCLua (rclua) is the name given to the combination of Rust, C, and Lua (official).

RCLua allows you to run Lua code from Rust. A key feature is that it wraps Lua official source code in a C program and calls it from Rust. This should make it easier to change Lua versions.

One of the key features of RCLua is that you can use Lua without installing it on your system. Even if Lua is already installed on the system, RCLua will not interfere with it. You can use it without polluting your system. This is because RCLua directly includes the official Lua source code and uses it as a library.

this document assumes RCLua v1.0.1

Supported Lua version

Lua 5.4.6 / Lua 5.4.0

Build

Rough environment: Rust 1.77.2 aarch64-apple-darwin / GCC 11.4.0 / CC 11.4.0 / GNU Make 4.3.

git clone git@github.com:flucium/rclua.git

# Release build
bash ./rclua/build.sh release

Usage

There are two main ways to use it. 1: crates.io. 2: self build.

crates.io

Please check version: https://crates.io/crates/rclua

# Open `Cargo.toml` in any editor.
# add [dependencies] rclua = "1.0.1" to Cargo.toml.

[dependencies]
rclua = "1.0.1"

self

Do the build as described in Section 'Build'.

# Open `Cargo.toml` in any editor.
# add [dependencies] rclua = "1.0.1" to Cargo.toml.
# 'path = ...' must be the location of RCLua(rclua).

[dependencies]
rclua = { path = "../rclua", version = "1.0.1" }

License

RCLua is licensed under the MIT License.

For Third-party licenses please read LICENSE_THIRDPARTY.

Lua

https://www.lua.org

https://www.lua.org/images/

Lua

Dependencies

~0–2MB
~41K SLoC