Getting Started
Installation
There are three ways to get Lehua: install it with Rokit, download a prebuilt release, or build it from source.
Install with Rokit
If you manage your tools with Rokit, install Lehua with one command:
rokit add thekingofspace/LehuaLang lehuaThe lehua at the end sets the name of the command. Without it, the command would be called LehuaLang.
Run this inside a project to add Lehua to that project's rokit.toml, or add --global to make the command available everywhere:
rokit add --global thekingofspace/LehuaLang lehuaDownload a release
Grab the archive for your system from the releases page:
- Windows:
lehua-windows-x86_64.zip - Linux:
lehua-linux-x86_64.tar.gz
Extract it. Inside is a folder with the program: lehua.exe on Windows, lehua on Linux. Move the program to a folder on your PATH so you can run it from anywhere.
Build from source
Building Lehua needs a recent Rust toolchain. You also need a C and C++ compiler, since the Luau backend is built from source. On Windows that means the Visual Studio C++ build tools. On Linux, install gcc and g++.
git clone https://github.com/thekingofspace/LehuaLang
cd LehuaLang
cargo build --release
# the runtime is now at target/release/lehua
./target/release/lehua --helpPut lehua on your PATH so you can run it from any project folder.