explaingit

luau-lang/luau

5,528C++Audience · developerComplexity · 4/5LicenseSetup · hard

TLDR

Luau is a scripting language created by Roblox, based on Lua, with added type-checking to catch coding mistakes automatically, used in Roblox games and embeddable in other C++ applications as a scripting engine.

Mindmap

mindmap
  root((repo))
    What it does
      Scripting language
      Lua with types
      Game scripting
    Features
      Type system
      Embeddable engine
      CLI tools
    Platforms
      Roblox
      C++ apps
      macOS and Linux
    Audience
      Game developers
      C++ engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Embed Luau as a scripting engine in your C++ game so users can write custom scripts without recompiling the game.

USE CASE 2

Use the Luau type checker to catch type errors in your Roblox game scripts before publishing them.

USE CASE 3

Run Luau scripts from the command line for game tooling or automation tasks on macOS or Linux.

Tech stack

C++LuaCMake

Getting it running

Difficulty · hard Time to first run · 30min

Embedding Luau in C++ requires building from source with CMake, for the standalone CLI, install prebuilt binaries via a package manager.

MIT license, use freely for any purpose, including commercial games and products, with no restrictions beyond keeping the copyright notice.

In plain English

Luau is a programming language created by Roblox. It started as a modified version of Lua, an older scripting language commonly used in games, and has been developed further with additional features and performance improvements. The most notable addition is a type system, which allows developers to annotate their code with information about what kinds of data a variable holds, and the language's tools can then catch mistakes automatically. The primary audience is game developers, particularly those building on the Roblox platform, where Luau is the main scripting language. However, the project has also been adopted by developers of other games, including several titles mentioned in the README. Roblox open-sourced the implementation so that the broader community and other companies could use and contribute to it. Luau is described as embeddable, which means software engineers can build it into their own applications as a scripting engine. A developer writing a game engine or application in C++ could include Luau so that users can write scripts that customize or extend the application without needing to recompile it. The README includes code examples and instructions for doing this. For people who just want to run Luau scripts, the project ships two command-line tools. One lets you run Luau scripts or experiment interactively. The other checks your code for type errors and style problems without running it, similar to a spell checker for code. Both tools can be installed through package managers on macOS and several Linux distributions. The project is released under the MIT license, which allows broad use including in commercial products. Documentation lives on a separate website rather than in the repository. Language design changes go through a public RFC process in a separate repository.

Copy-paste prompts

Prompt 1
Show me how to embed Luau in a C++ application so users can run custom scripts that call my app's functions.
Prompt 2
Write a Luau script for a Roblox game that spawns enemies and tracks player health using type annotations.
Prompt 3
How do I install and use the Luau type-checker command-line tool to find type errors in my existing Lua scripts?
Open on GitHub → Explain another repo

← luau-lang on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.