ianm199

ianm199 / lua-rs

Public

A Lua 5.4.7 interpreter written in Rust. Passes the upstream test suite (44/44); runs LuaRocks.

10
0
100% credibility
Found May 27, 2026 at 10 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Rust
AI Summary

lua-rs is a complete, faithful implementation of the Lua 5.4.7 programming language written entirely in Rust—without any C code or dependencies. It provides a standalone binary that can run Lua scripts, an embedding API that lets Rust applications host Lua scripts with custom Rust functions, and a WebAssembly version that runs Lua inside web browsers and Node.js. The project passes all 44 official Lua test cases, achieves performance comparable to the reference C implementation (~1.3× slower on average, with some tests faster), and is MIT-licensed. It supports the standard Lua library, file I/O, dynamic library loading, and installation of third-party libraries via LuaRocks.

How It Works

1
🔍 Discovery: A programming language interpreter in a new language

You learn about a project that's reimplemented the popular Lua programming language entirely in Rust, without using any C code.

2
⚙️ Download: Get the interpreter running on your computer

With one simple command, you install a ready-made program that runs Lua scripts directly from your terminal.

3
▶️ Run: Execute Lua code immediately

You write or paste any Lua code, and it runs instantly—math, text, programs—all without installing anything else.

4
Two paths: standalone use or embedded in your own app
💻
Standalone: Run scripts and explore interactively

Use lua-rs as a calculator, automation tool, or learn Lua through an interactive prompt.

🧩
Embedded: Add Lua scripting to your Rust project

Add powerful scripting capabilities to your app by calling a few Rust functions.

5
🌐 Extend: Install libraries just like regular Lua

You can use LuaRocks—the standard package manager—to install libraries that others have written for Lua.

Confidence: Your code runs correctly

Since lua-rs passes every test from the official Lua creators, you know your scripts work exactly as expected.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 10 to 10 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is lua-rs?

lua-rs is a complete Lua 5.4.7 interpreter built from scratch in Rust. Instead of wrapping the standard C implementation, it reimplements the lexer, parser, virtual machine, garbage collector, and standard library entirely in Rust with no C dependency. You get a standalone `lua-rs` binary that runs Lua scripts, an interactive REPL, and a Rust embedding API that lets you call Lua from your Rust programs or expose Rust functions to Lua scripts.

Why is it gaining traction?

The project proves its correctness by passing the full upstream PUC-Rio test suite (44/44 tests) against reference C output. The main draw is memory safety: Rust ownership and borrow checking eliminate entire classes of bugs that plague C codebases. You also get WebAssembly support out of the box for running Lua in browsers or Node without bundling the C interpreter. Pure Rust means no C toolchain, no `liblua` dependency, and easier cross-compilation.

Who should use this?

Rust developers who need embedded scripting will find the most value here. Game engine authors, plugin systems, and config language implementers are the obvious fit. Teams replacing legacy Lua bindings or wanting to avoid C FFI entirely should look closely. If you need Lua 5.4 compatibility with memory safety guarantees and are comfortable with an early-stage project, this delivers.

Verdict

lua-rs is a serious engineering effort with thorough correctness guarantees and a safety-first design philosophy. However, with only 10 stars and a 1.0% credibility score, this is a young project with limited community validation. The implementation quality is clear, but adoption risk is real. Watch it closely; it may become the standard for Rust-based Lua embedding, but do your own evaluation before betting production systems on it.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.