Skip to content
LuneBlox

LuneBlox

A standalone Luau runtime that runs Luau the way Roblox runs it. Code tested or measured here behaves like the code players run.

LuneBlox is Lune with the Luau underneath changed. It keeps Lune’s whole interface: the same @lune/* libraries, the same task scheduler, the same Roblox datatypes and place and model files. Lune scripts run unchanged.

Terminal window
luneblox run script.luau
luneblox setup # typedefs for luau-lsp, aliased as @lune
luneblox build script.luau # a standalone executable, carrying the same Luau and flags

Lune 0.10.5 runs Luau 0.709. Roblox runs 0.740, and runs it with its own set of Luau’s fast flags: Luau ships new compiler and VM work behind flags that default to off, and Roblox turns them on remotely. A benchmark or a test run on Lune measures a VM no game runs.

Lune 0.10.5 LuneBlox
Luau 0.709 0.740, the version Roblox runs
Luau’s fast flags Luau’s defaults set as the live Roblox client sets them
Luau’s C++ built with -Os -O3
_VERSION Lune 0.10.5+709 LuneBlox <version>+740

Why LuneBlox has the measurements, and Migrating from Lune lists what a Lune user will notice.

local fs = require("@lune/fs")
local net = require("@lune/net")
local serde = require("@lune/serde")
local response = net.request("https://api.github.com/repos/XopoIII/LuneBlox")
local repository = serde.decode("json", response.body)
fs.writeFile("stars.txt", tostring(repository.stargazers_count))
print(_VERSION, "wrote stars.txt")

The quick start walks through a first script.

Files and data

Read and write files and directories with @lune/fs; encode JSON, TOML and YAML, compress and hash with @lune/serde. Files and data.

Networking

HTTP requests, an HTTP and WebSocket server, and plain TCP with @lune/net. Networking.

Processes and the terminal

Arguments, the environment and child processes with @lune/process; colours and prompts with @lune/stdio. Processes.

The task scheduler

task.spawn, task.defer, task.delay and task.wait, as on Roblox. The task scheduler.

Roblox files

Open place and model files, change instances and properties, and write them back with @lune/roblox. Roblox files.

Standalone executables

luneblox build turns a script into one executable, for this machine or another target. Standalone executables.

Every library is listed in full in the reference, starting with fs. Those pages are generated from the same typedefs luneblox setup gives your editor.