Two Ways to Run: Luma Will Be Both Interpreted and Compiled

Two Ways to Run: Luma Will Be Both Interpreted and Compiled

November 24, 2026·
Luma Core Team

Yesterday we announced that Luma is leaving Go behind and getting a compiler of its own. Today we want to explain one of the most important design choices for Luma 0.2.0: every Luma program will be able to run in two ways.

  • Interpreted, like Python or PHP: luma run hello.luma runs your code right away.
  • Compiled, like Go or Rust: luma build hello.luma turns your code into a standalone program.

Same language, same code, same results. You choose which one fits the moment.

Nothing is built yet. This post describes the plan.

Two families of languages

Programming languages usually pick a side.

Interpreted languages such as Python, PHP, Ruby and JavaScript run your code directly. You write a line, run it and see the result. There’s no build step and no waiting. That’s why they’re so popular for learning, scripting and trying ideas. The price is that your program always needs the interpreter installed, and it usually runs slower.

Compiled languages such as Go, Rust and C turn your code into a finished program first. That takes a moment, but the result is fast and stands on its own: you can copy it to another computer and run it there, with nothing else installed. The price is the extra build step and, often, a steeper start for beginners.

Most developers end up using one of each: a scripting language for quick jobs and a compiled language for “real” programs. That means two syntaxes, two sets of rules and two ways of thinking.

We want Luma to be both.

How it will look

The plan is one command, luma, with two ways to use it:

luma run hello.luma      # runs it now, no file is created
luma build hello.luma    # creates ./hello (hello.exe on Windows)
./hello                  # runs anywhere, Luma not needed

Both will understand exactly the same language. A program that works with luma run will work with luma build, and the other way around.

Same results, every time

This is the promise we care about most: the two modes give identical output. The same numbers printed the same way, the same error messages, the same behaviour in every corner case.

That’s harder than it sounds. Printing a floating-point number, rounding, dividing by zero, a string with unusual characters: in many systems these behave slightly differently depending on how the code runs. In Luma they must not. We plan to test both modes side by side from the very first feature, so they never drift apart.

Why this is useful

For learners

Starting is as simple as it gets: write a file, type luma run, see the result. No build step, no project setup, nothing to configure. And when you’ve written something you’re proud of, luma build turns it into a real program you can give to a friend. You don’t have to learn a second language to make it “real”.

For everyday scripts

Small jobs such as renaming files, checking a website or reading a CSV file are perfect for luma run. Edit, run, repeat.

For tools and servers

When a script grows into a tool your team relies on, or a web service that runs all day, luma build makes a single file that starts fast and runs fast. Copy it to the server and you’re done. No runtime to install, no dependencies to manage.

For testing

Because both modes must agree, tests can run in either. Use the quick one while you work and the compiled one before you ship, and know that what you tested is what runs.

For sharing across systems

We plan for luma build to make programs for Linux and Windows, from either one. Build a Windows program on your Linux machine and hand it to a colleague who has never heard of Luma.

What it opens up for Luma

Having both modes in the same language gives us room to grow in directions that a single mode would close off:

  • A smooth path from idea to product. One language from the first experiment to the program running in production.
  • Better learning tools. The interpreter is the natural home for teaching features: clear error messages, and ways to look inside how your program works.
  • Looking inside the compiler. Since Luma makes its own programs, we want to let you see each step: how your code is read, checked and turned into machine instructions. A language that shows you how languages work.
  • Libraries written in Luma. When the language itself is fast enough when compiled, more of the standard library can be written in Luma, and you can read it to learn from it.
  • Speed where it matters. Use the interpreter to develop, and the compiler when every millisecond counts.

What comes next

The first milestone is the foundations: numbers, strings, variables, if/else, lists, maps and sets, working in both modes from day one. Every feature after that will follow the same rule: it isn’t done until luma run and luma build agree.

We’ll be writing about the first steps soon.

Last updated on