Ecosystem tools: Lune, darklua, roblox-ts

Meet the tools around Rojo that studios actually use. Run a Lune script, see what darklua rewrites, compare roblox-ts with Luau, choose between Wally and pesde, and check each tool's maintenance state before you depend on it.

Tool lesson, about 70 minutes, 11 steps

By the end you can

  • Say what Lune, darklua and roblox-ts each do, and when a studio reaches for each one
  • Compare Wally and pesde, and read a version requirement such as 0.7.5 or ^1.2.3
  • Read Beacon Yard's selene.toml and stylua.toml and say what each setting does
  • Check a tool's repository and say honestly whether it is still maintained

Before this: The toolchain: Rokit, Wally, pesde, StyLua, Selene, luau-lsp

1A pegboard of tools

A workshop wall has a pegboard. Every tool has a hook, and you take down only what the job needs. The Roblox ecosystem works like that. Rojo, Rokit, StyLua and Selene are already on your wall. This lesson adds the tools you will see on other studios' walls:

Both sidesThe tool ecosystem is a pegboard of tools above the workbench.
In the pictureIn Roblox
A hook on the pegboardOne tool pinned in rokit.toml, with a version
Taking down only what the job needsA project uses Lune, darklua or roblox-ts only when it has that job
A tool that is gone from its hookA tool whose repository says it is no longer maintained

See the whole analogy cast

  • Lune runs Luau scripts outside Roblox: build scripts, deploy scripts, admin tools.
  • darklua rewrites Luau files with rules, for example to change how modules are required.
  • roblox-ts compiles TypeScript to Luau, for teams that prefer TypeScript.
  • Wally and pesde install other people's libraries.
  • Mantle deployed whole experiences from a config file. Its state needs a careful look, which comes later.

Match each job to the tool you would take off the pegboard.

  1. Read rokit.toml and print the pinned tools from a terminal
  2. Strip comments and rewrite requires across a folder of Luau files
  3. Write the game in TypeScript and get Luau out
  4. Download ProfileStore at a pinned version into the project
Answer

Read rokit.toml and print the pinned tools from a terminal: Lune; Strip comments and rewrite requires across a folder of Luau files: darklua; Write the game in TypeScript and get Luau out: roblox-ts; Download ProfileStore at a pinned version into the project: Wally or pesde. Lune is a runtime for scripts, darklua is a code transformer, roblox-ts is a compiler, and Wally and pesde are package managers.

Open this step in lesson mode · Link to this step · This confused me

2Lune: Luau with a terminal

LuneLuneA standalone Luau runtime for scripts and tools outside Roblox.Think of it as luau with a terminal, a filesystem and the internet. is a standalone Luau runtime. It runs .luau files from a terminal, with built-in libraries for the filesystem, networking, JSON and TOML, and the command line1. It ships as one small executable. It is not Roblox: its own docs list running full Roblox games outside Roblox as a non-goal. Its security page warns that any script you run has full access to your device2. It can also read and write place and model files, which is why studios use it for build and deploy scripts3.

Beacon Yard already has something a script could read. Its tools are pinned in one file.

[tools]
rojo = "rojo-rbx/rojo@7.5.1"
stylua = "JohnnyMorganz/StyLua@2.1.0"
selene = "Kampfkarren/selene@0.32.0"
wally = "UpliftGames/wally@0.3.2"
Figure 2.1

How many tools does Beacon Yard's rokit.toml pin at the m06 milestone?

Answer

4 tools. Rojo, StyLua, Selene and Wally: four lines, each pinned to an exact version so every machine and CI run uses the same tools.

Open this step in lesson mode · Link to this step · This confused me

3Write your first Lune script

Lune is installed the same way as the rest of your toolchain, with Rokit1. A script that parses rokit.toml is about ten lines.

luau
-- tools/tools.luau: list the tools this project pins in rokit.toml.
local fs = require("@lune/fs")
local serde = require("@lune/serde")
 
local manifest = serde.decode("toml", fs.readFile("rokit.toml"))
local names = {}
for name in manifest.tools do
	table.insert(names, name)
end
table.sort(names)
for _, name in names do
	print(name, manifest.tools[name])
end

Build along

m06-drone-wrench

  • tools/tools.luau
  • rokit.toml
  1. In your clone, run rokit add lune.

    You should see rokit.toml gains a lune line, and lune --version prints a version number inside the repo folder.

  2. Save the script above as tools/tools.luau.

    You should see The file exists in a tools folder next to src.

  3. Run lune run tools/tools.

    You should see Five lines print in alphabetical order: lune (the one you just added), rojo, selene, stylua and wally, each with its owner, name and version.

A stranger sends you a handy .luau script. What do Lune's own docs say you should know before you run it?

  1. It has full access to your files and programs, so read it first or run it in a sandbox, container or virtual machine
  2. Lune always asks permission before touching files
  3. Scripts can only read the folder they live in
  4. It is safe because it is Luau and not Python
Answer

It has full access to your files and programs, so read it first or run it in a sandbox, container or virtual machine. Lune's security page says any script you run has full access to your device and suggests a sandbox, a container or a virtual machine for untrusted scripts. A Lune script is a program, so treat it like one.

Open this step in lesson mode · Link to this step · This confused me

4darklua: rewrite the code before it ships

darkluadarkluaA command line tool that rewrites Lua and Luau files using configurable rules.Think of it as a find-and-replace that understands code, run on a whole folder. reads Lua and Luau files, passes each through a list of rules, and writes new files. The command is darklua process <input> <output>, with an optional config file4. Rules do things like remove comments, rename variables, or convert how a module is required5. They run one after another, and the docs warn that the order sometimes matters6.

The most useful rule for Roblox is convert_require. Code written with file paths or aliases can be turned into the instance paths Roblox needs7. This cell shows the idea in ten lines. Real darklua reads a config file and your project's sourcemap.

Luau
-- The idea behind darklua's convert_require: rewrite a require that uses a
-- file alias into the form the target understands. Real darklua reads a
-- config file and a sourcemap; this is only the idea.
local aliases = {
	["@shared"] = 'game:GetService("ReplicatedStorage").Shared',
	["@server"] = 'game:GetService("ServerScriptService").Server',
}
 
local function rewrite(line: string): string
	local result = string.gsub(line, 'require%("(@%w+)/([%w_]+)"%)', function(alias: string, name: string)
		local root = aliases[alias]
		if root == nil then
			return nil
		end
		return "require(" .. root .. "." .. name .. ")"
	end)
	return result
end
 
print(rewrite('local Config = require("@shared/Config")'))
print(rewrite('local Thing = require("@other/Thing")'))
Figure 4.1. Expected output: local Config = require(game:GetService("ReplicatedStorage").Shared.Config) local Thing = require("@other/Thing")

The second line has an alias the table does not know. Why does the cell leave it alone instead of guessing?

  1. A rewrite tool should change only what it understands; a wrong guess would ship broken code
  2. Luau cannot rewrite text
  3. Aliases that start with @ are always illegal
  4. gsub can only change one line
Answer

A rewrite tool should change only what it understands; a wrong guess would ship broken code. The callback returns nil, which keeps the original text. A transformer that guesses can turn a visible error into a hidden one.

Open this step in lesson mode · Link to this step · This confused me

5roblox-ts: another language on the same road

roblox-tsroblox-tsA compiler from TypeScript to Luau for Roblox.Think of it as a translator that writes the Luau for you from TypeScript. compiles TypeScript to Luau. A project starts with npm init roblox-ts, the compiler runs with npx rbxtsc -w, and Rojo syncs the output into Studio, so it slots into the workflow you already know8. Teams pick it for TypeScript's tooling and types, or because the team already writes TypeScript elsewhere.

Its cost is a second language and a build step between your source and what Studio runs, so you debug code that was generated for you. Roblox's API types also come from a separate package, @rbxts/types. Its state needs checking too, as a later step shows.

Other ways pros do this

OptionWhat it isWhen pros pick itTrade-offs
Luau (plain)The language Roblox runs. Type annotations and strict mode are built in.Most studios, and everything in this course. It is the fastest path from an idea to Studio and every Roblox doc example is in it.Luau's type checker is younger than TypeScript's and has fewer ecosystem tools.
roblox-tsTypeScript compiled to Luau, with Roblox types from the @rbxts packages.Teams that already write TypeScript and want its editor tools, and that accept a compile step.A second language and toolchain. Its stable release is 3.0.0 from 2024, with newer development builds on npm's next tag.
Luau plus darkluaWrite Luau, then transform the files with rules before building.Code that must run in more than one place, such as a Roblox place and a Lune script.One more pipeline step to pin and debug.

If Beacon Yard were rewritten in roblox-ts instead of plain Luau, which would be a real cost?

  1. A compile step, and debugging code that was generated from your source
  2. It cannot call Roblox services
  3. It cannot be used with Rojo
  4. It makes the game run slower than any Luau
Answer

A compile step, and debugging code that was generated from your source. roblox-ts calls the same services and syncs through Rojo. The cost is the build step and a second language to debug.

Open this step in lesson mode · Link to this step · This confused me

6Wally or pesde

Both tools download libraries into your project. WallyWallyA package manager for Roblox: wally.toml lists libraries, wally install downloads them into Packages.Think of it as npm or pip for Luau libraries. is the established one. Its registry is a GitHub repository, its manifest is wally.toml, and Beacon Yard uses it from m10-memory to install ProfileStore (and from m09-react-shop for React-lua)9. pesdepesdeA package manager for Luau with its own registry and per-runtime package targets.Think of it as wally's newer cousin that also works outside Roblox. is newer. It supports packages that target Roblox or Lune, can install Wally packages through a wally_indices list, and has its own registry10.

Both read a version requirement. In Wally, a bare 1.2.3 means the same as ^1.2.3, which matches Cargo's rule911. The rule is about what a safe upgrade is: the leftmost non-zero number must not change.

Other ways pros do this

OptionWhat it isWhen pros pick itTrade-offs
WallyPackage manager for Roblox with a GitHub-hosted registry and a lockfile.The default in most studios today, and what Roblox's own guides mention.Roblox only. Its latest release, 0.3.2, is from 2023, though the repository is still updated.
pesdePackage manager for Luau with its own registry and per-runtime targets.New projects that also run Luau outside Roblox, or that want to install Wally packages and pesde packages together.Pre-1.0 (0.7.x), with a smaller registry. Read its docs for the version you install.
VendoringCopy the library's files into your repository by hand.One tiny dependency, or a library you will fork.No version check and no upgrade path. You own every fix.

A manifest asks for 0.7.5. Which is the first release it refuses?

requirement  first refused
1.2.3        2.0.0
^1.2.3       2.0.0
0.7.5        ?
  1. 0.8.0
  2. 1.0.0
  3. 0.7.6
  4. 0.7.10
Answer

0.8.0. For a version that starts with 0, a caret requirement keeps the minor number fixed, so 0.7.5 accepts 0.7.9 and refuses 0.8.0. This is why pre-1.0 tools break more often on updates.

Luau
-- What does a requirement allow? Find the first release it refuses.
local function firstRefused(requirement: string): string
	local major, minor, patch = string.match(requirement, "^%^?(%d+)%.(%d+)%.(%d+)$")
	local a, b, c = tonumber(major) :: number, tonumber(minor) :: number, tonumber(patch) :: number
	if a > 0 then
		return string.format("%d.0.0", a + 1)
	elseif b > 0 then
		return string.format("0.%d.0", b + 1)
	end
	return string.format("0.0.%d", c + 1)
end
 
for _, requirement in { "1.2.3", "^1.2.3", "0.7.5", "0.0.3" } do
	print(requirement .. " refuses " .. firstRefused(requirement) .. " and later")
end
Figure 6.1. Expected output: 1.2.3 refuses 2.0.0 and later ^1.2.3 refuses 2.0.0 and later 0.7.5 refuses 0.8.0 and later 0.0.3 refuses 0.0.4 and later

From m10-memory, Beacon Yard's wally.toml asks for lm-loleris/profilestore@1.0.3. A later wally update may install which of these?

  1. 1.9.0, but never 2.0.0
  2. Only exactly 1.0.3
  3. 2.0.0, because it is newer
  4. Nothing; Wally never updates
Answer

1.9.0, but never 2.0.0. A bare 1.0.3 means ^1.0.3, which accepts any release that is at least 1.0.3 and below 2.0.0. The lockfile pins the exact version that was installed, so the update happens only when someone runs it.

Open this step in lesson mode · Link to this step · This confused me

7Two tiny config files

Two of the tools on your wall are configured by files small enough to read in a breath. Beacon Yard's are at the top of the repository.

Figure 7.1
column_width = 120
line_endings = "Unix"
indent_type = "Tabs"
indent_width = 4
quote_style = "AutoPreferDouble"
call_parentheses = "Always"
collapse_simple_statement = "Never"
Figure 7.2

std = "roblox" tells Selene to use Roblox's globals, such as game and Vector3, instead of plain Lua 5.1. Selene generates that definition itself and refreshes it every six hours, which needs an internet connection. A project can pin it with roblox-std-source = "pinned"12. StyLua's seven settings are the same as its defaults, so the file records the style instead of changing it13.

StyLua's defaults are column_width 120, Unix line endings, Tabs, indent_width 4, AutoPreferDouble, Always and Never. How many of Beacon Yard's seven settings differ from them?

Answer

0 settings. None differ. Writing defaults down still helps: a new contributor sees the style in one place, and a future StyLua release cannot silently change it.

A teammate changes stylua.toml and CI's stylua --check starts failing on every Luau file. Which line broke it?

column_width = 120
line_endings = "Unix"
indent_type = "Spaces"
quote_style = "AutoPreferDouble"
Answer

Line 3: indent_type = "Spaces". Fixed: indent_type = "Tabs". The repository is formatted with tabs. With Spaces, StyLua wants every indent rewritten, so the check fails on every file. The formatter's file and the committed code must agree.

Open this step in lesson mode · Link to this step · This confused me

8Where the pegboard breaks

Both sidesRemember: The tool ecosystem is a pegboard of tools above the workbench.

A pegboard tool does not care what you used before it. Build tools do. Answer before you read the breakdown.

Where does it break?“A pegboard of tools above the workbench” is a good picture of the tool ecosystem. Where does it stop being true?

It breaks here. Pegboard tools do not care what was done before them, but build tools run in a pipeline where order and versions matter: a rule that needs a value runs after the rule that injects it, and a build needs its packages installed first.

The true model. Ecosystem tools are separate programs that you chain: install pinned versions, install packages, transform code, build the place. Each step feeds the next, so the order and the exact versions are part of the project and belong in files that CI also reads.

darklua's docs warn that the order of rules sometimes matters. What would go wrong if a rule that computes constant expressions ran before the rule that injects the constant's value?

  1. It would find nothing to compute, because the value is not there yet
  2. darklua would refuse to start
  3. The output would be larger
  4. Nothing; rules are independent
Answer

It would find nothing to compute, because the value is not there yet. Rules run one by one and each feeds the next, so inject the value first, then compute with it. A pipeline is not a pegboard: order and versions matter.

Open this step in lesson mode · Link to this step · This confused me

9Is it still alive?

Before a team puts a tool in its pipeline, someone opens the repository and looks: the last release, the last commit, open issues, the README's first lines. The table below is what that check showed on 2026-11-23.

Reference Tool state on 2026-11-23

Dates and versions come from each project's GitHub releases page and README, read on that day. Mantle's notice is the first thing its README says14. These facts go stale quickly, so repeat the check yourself.

v0.11.1, 21 Oct 2026, MPL-2.0
Active. Recent release and commits.
v0.19.0, 10 Jun 2026, MIT
Active. The last release is five months old; the last push was 13 Jul 2026.
v3.0.0, 12 Sep 2024, MIT
Stable release is over two years old. Development builds are on npm's next tag (latest 1 Oct 2026) and the repository was pushed to on 30 Oct 2026. Active, but check which build you need.
v0.3.2, 5 Jun 2023, MPL-2.0
Last release is three years old. Repository pushed to on 12 Oct 2026. Roblox's own guides still list it.
v0.7.5, 22 Nov 2026, MIT
Very active. Pre-1.0, so expect changes.
v0.11.18, 14 Mar 2025, MIT
Its README says it is no longer maintained and not to expect fixes or replies. Do not start a new project on it.
v7.7.1, 2 Oct 2026, MPL-2.0
Active. Beacon Yard pins 7.5.1, two minor versions behind.

A tool's README starts with 'no longer maintained'. Your build already uses it and works. What is the best next step?

  1. Pin it, note the risk, and plan a replacement before the day it breaks
  2. Ignore the notice because it works today
  3. Delete the project
  4. Wait for the maintainers to answer an issue
Answer

Pin it, note the risk, and plan a replacement before the day it breaks. An unmaintained tool keeps working until an API it calls changes. Pin the version so it does not move under you, write down what replaces it, and move at a calm time. Mantle's README says not to expect replies or fixes.

Open this step in lesson mode · Link to this step · This confused me

10Challenges

Level 1, Apprentice

Challenge

Turn the listing script into a check a CI job could run.

Start from
m06-drone-wrench with Lune installed

Done means

  • tools/tools.luau prints the tools sorted by name
  • It also prints how many tools are pinned
  • It exits with an error when a tool's version string has no @ in it

Hints

  1. process.exit(1) from @lune/process ends the script with a failure code.
  2. string.find(value, "@", 1, true) does a plain search.
  3. Count in the loop that already prints.

Level 2, Builder

Challenge

Process the game's code through one darklua rule and check what changed.

Start from
m06-drone-wrench with darklua installed (rokit add seaofvoices/darklua)

Done means

  • A .darklua.json that lists the remove_comments rule
  • darklua process src out writes a copy of the Luau files in out
  • No comment lines remain in the out copy, and src is unchanged

Hints

  1. The config is a JSON object with a rules array.
  2. The process command takes an input path and an output path.
  3. Delete out afterwards, or add it to .gitignore; it is build output.

Why does the level 3 challenge compare 1.9.0 and 1.10.0 as numbers?

  1. As text, 1.10.0 sorts before 1.9.0, so a text compare picks the wrong release
  2. Because version numbers cannot contain letters
  3. Because Wally refuses two-digit numbers
  4. It does not; the challenge only tests 1.9.0
Answer

As text, 1.10.0 sorts before 1.9.0, so a text compare picks the wrong release. Alphabetical order puts 1.10.0 before 1.9.0 because the character 1 sorts before 9. Compare each part as a number.

Level 3, Professional

Challenge

Write the rule your package manager uses to decide which updates are safe. Start from the m14-ship tag in the game repo, then run it with game.ServerScriptService.RunGameTests:Invoke("ecosystem-tools").

Start from
The game at milestone m14 (download)
Grade it
In Studio, press Play, then run game.ServerScriptService.RunGameTests:Invoke("ecosystem-tools") in the server command bar. Copy the pass code from Output.

Done means

  • challenges/work/version_req.luau treats 1.2.3 and ^1.2.3 as the same caret rule
  • A version below 1.0.0 keeps its left-most non-zero number fixed
  • ~1.2.3 allows patch changes only and =1.2.3 allows exactly 1.2.3
  • Parts are compared as numbers and junk input returns false
  • The ecosystem-tools challenge prints TEST PASS for all seven checks

Hints

  1. The stock file compares the two strings for equality.
  2. Split each version into three numbers with string.match, then compare part by part.
  3. Build the first refused version from the requirement, then require the release to be below it.

Open this step in lesson mode · Link to this step · This confused me

11Recap

Retiring the analogy

You no longer need “a pegboard of tools above the workbench”. Ecosystem tools are separate programs that you chain: install pinned versions, install packages, transform code, build the place. Each step feeds the next, so the order and the exact versions are part of the project and belong in files that CI also reads.

Recap

  1. Lune runs Luau scripts outside Roblox with full file access, darklua rewrites code with ordered rules, and roblox-ts compiles TypeScript to Luau at the cost of a build step.
  2. Wally and pesde both read caret version requirements, where below 1.0.0 the minor number is the breaking one. Beacon Yard's wally.toml and rokit.toml pin exactly what CI uses.
  3. Check a tool's repository before you depend on it: Mantle is unmaintained, roblox-ts's stable release is two years old, and Wally's last release is from 2023.

The tool ecosystem is a pegboard of tools above the workbench, until pegboard tools do not care what was done before them, but build tools run in a pipeline where order and versions matter: a rule that needs a value runs after the rule that injects it, and a build needs its packages installed first.

Next Continuous integration: every check, blocking

Open this step in lesson mode · Link to this step · This confused me