r/lua 6d ago

Help Help needed: Best Lua version/implementation for Rust integration and general scripting?

Hey everyone,

I'm trying to pick up Lua mainly for general scripting and embedding into Rust projects for things like config files. If I end up liking it as much as Rust, I'll probably dive deeper into it.

The main thing tripping me up is how many versions and runtimes exist out there (Lua 5.1, 5.4, LuaJIT, Luau, ...).

If anyone has experience embedding Lua in Rust (maybe using `mlua`), which version should I actually focus on learning? Also, are there any weird compatibility traps or gotchas I should watch out for?

Appreciate any advice or resources 🙏

12 Upvotes

10 comments sorted by

View all comments

1

u/ALameLlama 1d ago

There is https://github.com/mlua-rs/mlua which is rust bindings for lua.