Was ist das LUAU-Dateiformat?
Eine .luau-Datei enthält Quellcode in Luau, der Skriptsprache, die Roblox von .lua (Lua 5.1) abgeleitet hat. Die Roblox Corporation stellte Luau den Entwicklern erstmals 2019 zur Verfügung und veröffentlichte es 2021 als Open Source unter der MIT-Lizenz. Die Datei besteht aus einfachem UTF-8-Text, sodass jeder Editor sie lesen kann.
Luau behält die Kompatibilität mit Lua 5.1 bei und fügt ein schrittweises Typsystem, Typinferenz, String-Interpolation und Sandboxing hinzu. Innerhalb von Roblox Studio wird jedes Script, LocalScript und ModuleScript als .luau-Datei auf der Festplatte gespeichert. Die separate Dateiendung ermöglicht es Editoren und Lintern, die Luau-Syntax zu erkennen, anstatt sie als gewöhnliches Lua zu behandeln. Über Roblox hinaus betten Studios wie Remedy und Digital Extremes Luau in ihre eigenen Game-Engines ein, sodass Sie .luau-Dateien auch außerhalb der Roblox-Welt antreffen können.
Sicherheit
RISIKO: MEDIUMA .luau file is plain-text source code and cannot run on its own; it only executes inside Roblox, the luau runtime, or another host that embeds Luau. Like any script, code from an untrusted source can perform unwanted actions when run, and the Roblox community has seen malicious model scripts (backdoors) shipped inside shared assets. Read the source before running it, and be cautious with obfuscated or copy-pasted scripts.
Formatdetails
kurz gefasstProgramme zum Öffnen von LUAU-Dateien
.luau on disk. .luau file directly; install the Luau Language Server extension for syntax highlighting, type checking, and autocomplete. luau script.luau in a terminal to execute the file, or luau-analyze script.luau to type-check and lint it. .luau files. .luau file; add the Luau Language Server extension for full language support. luau script.luau or analyze it with luau-analyze script.luau from Terminal. .luau file and install the Luau Language Server extension for highlighting and diagnostics. luau script.luau to execute or luau-analyze script.luau to check the file. .luau; edit them in the browser-linked Studio environment. Technische Details
technische Spezifikation| Encoding | UTF-8 plain text (ASCII-compatible) |
| Byte order | N/A (text, no multibyte header) |
| Container | None; flat source file |
| Typical size | A few hundred bytes to tens of kilobytes |
| Structure | Human-readable Luau source code. May start with an optional mode directive comment (--!strict, --!nonstrict, or --!nocheck), followed by statements, function and type definitions. Type annotations on variables, parameters and return values are optional. |
| Integrity | None built in |
| Platforms | Windows, macOS, Linux, Web (Roblox platform) |
| Language Derived From | Lua 5.1 |
| Type System | Gradual, structural type inference (opt-in annotations) |
| Runtime | C++ Luau VM with rewritten interpreter, incremental garbage collector, and native x64/ARM64 code generation |
| Line Terminator | LF or CRLF |
| Notes | Luau is backward compatible with Lua 5.1 source, so many .luau files also run under a plain Lua 5.1 interpreter unless they use Luau-only syntax such as type annotations, string interpolation, or the continue keyword. |
| Veröffentlicht | 2019 |
| Neueste Version | N/A (rolling releases; no versioned file format) |
| Offener Standard | Ja · lizenzgebührenfrei |
| Spezifikation | luau.org |
LUAU-Konvertierungen
Community Q&A
von Nutzern gefragtNoch keine Fragen - stellen Sie die erste Frage zu LUAU-Dateien.
Häufig gestellte Fragen
Was ist eine .luau-Datei?
Wie öffne ich eine .luau-Datei?
luau aus.Was ist der Unterschied zwischen .luau und .lua?
.luau kennzeichnet Dateien, die für den Luau-Dialekt von Roblox geschrieben wurden, der Typanmerkungen und andere Funktionen hinzufügt. Roblox Studio speichert seine Skripte als .luau, während .lua von Standard-Lua und älteren Roblox-Exporten verwendet wird.Kann ich eine .luau-Datei außerhalb von Roblox ausführen?
luau aus den GitHub-Releases des Projekts herunter und führen Sie luau dateiname.luau aus. Skripte, die Roblox-spezifische APIs aufrufen, funktionieren außerhalb der Roblox-Engine nicht.