Environment variables
| Variable | Read by | Effect |
|---|---|---|
LUNE_ROBLOX_FFLAGS |
Everything that runs or compiles Luau | 0 keeps Luau’s default fast flags |
LUNE_LUAU_JIT |
luneblox run |
0, false or off turns native code generation off |
LUNEBLOX_CACHE |
luneblox build --target |
Sets the cache directory |
LUNEBLOX_STATE |
luneblox repl |
Sets the state directory |
XDG_CACHE_HOME |
luneblox build --target |
Base of the cache directory on Linux |
XDG_STATE_HOME |
luneblox repl |
Base of the state directory on Linux |
RUST_LOG |
Every command | Turns on internal trace logging |
The first two keep the LUNE_ prefix. The directory overrides use LUNEBLOX_.
LUNE_ROBLOX_FFLAGS
Section titled “LUNE_ROBLOX_FFLAGS”By default LuneBlox sets Luau’s fast flags to the values the live Roblox client uses. With this
variable set to 0, it leaves Luau’s own defaults in place.
| Value | Effect |
|---|---|
0 |
Luau’s default flags |
| Anything else, or unset | Roblox’s flags |
LUNE_ROBLOX_FFLAGS=0 luneblox run bench.luauIt is read once per process, before the first Luau VM is created, by luneblox run, the REPL,
luneblox build and standalone executables. See Fast flags.
LUNE_LUAU_JIT
Section titled “LUNE_LUAU_JIT”luneblox run turns on Luau’s native code generation. This variable turns it off.
| Value | Effect |
|---|---|
0, false, off |
The script runs interpreted |
| Anything else, or unset | Native code generation is on |
The match is exact and case-sensitive: OFF and False leave it on.
LUNE_LUAU_JIT=off luneblox run bench.luauOnly luneblox run reads it. The REPL and standalone executables run with native code generation
off whatever its value. See Running scripts.
LUNEBLOX_CACHE
Section titled “LUNEBLOX_CACHE”The cache directory, used as given. luneblox build --target keeps downloaded base executables in
its target folder.
LUNEBLOX_CACHE=/tmp/luneblox-cache luneblox build tool.luau --target linux-x86_64The base executable lands in /tmp/luneblox-cache/target/linux-x86_64.
When set, it wins over every other rule, including an existing ~/.luneblox/target. No luneblox
segment is appended to it.
LUNEBLOX_STATE
Section titled “LUNEBLOX_STATE”The state directory, used as given. The REPL keeps its history file, .luneblox_history, in it.
LUNEBLOX_STATE=/tmp/luneblox-state luneblox replThe history is /tmp/luneblox-state/.luneblox_history. When set, it wins over every other rule.
XDG_CACHE_HOME and XDG_STATE_HOME
Section titled “XDG_CACHE_HOME and XDG_STATE_HOME”On Linux, when the LUNEBLOX_ overrides are not set, the cache directory is
$XDG_CACHE_HOME/luneblox and the state directory is $XDG_STATE_HOME/luneblox. When the XDG
variables are not set, their standard defaults apply: ~/.cache and ~/.local/state.
On macOS and Windows these variables are not read; the platform’s own cache location is used.
Files that already exist in the older home-directory locations keep being used. See Directories for the full order.
RUST_LOG
Section titled “RUST_LOG”luneblox has internal trace logging, written to stderr. It is off unless RUST_LOG sets a level:
RUST_LOG=trace luneblox run script.luauThis is for debugging the runtime itself, such as the order the scheduler resumes threads in. A script does not need it.
Variables for your script
Section titled “Variables for your script”Every environment variable of the process is available to the script in process.env:
--!strictlocal process = require("@lune/process")
local port = tonumber(process.env.PORT) or 8080print(port)PORT=3000 luneblox run server.luauSee process.
