Co to jest format pliku LUAU?
Plik .luau zawiera kod źródłowy napisany w Luau, języku skryptowym, który Roblox wyodrębnił z .lua (Lua 5.1). Roblox Corporation po raz pierwszy udostępniła Luau deweloperom w 2019 roku, a w 2021 roku wydała go jako open source na licencji MIT. Plik jest zwykłym tekstem w formacie UTF-8, więc każdy edytor może go odczytać.
Luau zachowuje kompatybilność z Lua 5.1, dodając jednocześnie system stopniowego typowania, wnioskowanie typów, interpolację ciągów znaków oraz piaskownicę (sandboxing). Wewnątrz Roblox Studio każdy Script, LocalScript i ModuleScript jest zapisywany na dysku jako plik .luau. Oddzielne rozszerzenie pozwala edytorom i linterom rozpoznawać składnię Luau zamiast traktować ją jak zwykłą Lua. Poza Robloxem, studia takie jak Remedy i Digital Extremes osadzają Luau we własnych silnikach gier, więc pliki .luau można spotkać również poza światem Roblox.
Bezpieczeństwo
RYZYKO: 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.
Szczegóły formatu
w pigułceProgramy otwierające pliki LUAU
.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. Szczegóły techniczne
specyfikacja| 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. |
| Wydano | 2019 |
| Najnowsza wersja | N/A (rolling releases; no versioned file format) |
| Otwarty standard | Tak · bezpłatny (royalty-free) |
| Specyfikacja | luau.org |
Konwersje LUAU
Pytania i odpowiedzi społeczności
pytania użytkownikówBrak pytań - bądź pierwszą osobą, która zapyta o pliki LUAU.
Najczęściej zadawane pytania
Co to jest plik .luau?
Jak otworzyć plik .luau?
luau.Jaka jest różnica między .luau a .lua?
.luau oznacza pliki napisane dla dialektu Luau używanego przez Roblox, który dodaje adnotacje typów i inne funkcje. Roblox Studio zapisuje swoje skrypty jako .luau, podczas gdy .lua jest używane przez standardową Lua i starsze eksporty z Roblox.Czy mogę uruchomić plik .luau poza Roblox?
luau z wydań projektu na GitHub i uruchom luau twojplik.luau. Skrypty wywołujące API specyficzne dla Roblox nie będą działać poza silnikiem Roblox.