Choosing a version
All five versions run from one build. Pick one per instance; the rest of the API is the same across versions.
Selecting a version
rust
use omnilua::{Lua, LuaVersion}; let lua = Lua::new_versioned(LuaVersion::V53);
CLI / wasm
$ OMNILUA_VERSION=5.3 omnilua script.lua // js: loadLuaRs(luaRsWasmUrl, { version: "5.3" })
The default is 5.4. 5.4 is the most thoroughly tested; it passes the full official PUC-Rio suite. The others run their own upstream suites and are checked against the reference lua binary.
Differences that matter
- Numbers. 5.1 and 5.2 have no integer type — every number is a float. 5.3+ have integers, so
3 / 3prints1.0on 5.4 and1on 5.1. math.random. Uses a Rust PRNG, so the sequence won't match reference C.- Standard library. The version sets the roster:
bit32is 5.2 only;utf8andstring.packare 5.3+;gotois 5.2+.
See it
The playground runs one snippet across all five versions so you can watch the output diverge.