¿Qué es el formato de archivo LUAU?
Un archivo .luau contiene código fuente escrito en Luau, el lenguaje de programación que Roblox derivó de .lua (Lua 5.1). Roblox Corporation entregó Luau por primera vez a los desarrolladores en 2019 y lo lanzó como código abierto bajo la Licencia MIT en 2021. El archivo es texto plano UTF-8, por lo que cualquier editor puede leerlo.
Luau mantiene la compatibilidad con Lua 5.1 al tiempo que añade un sistema de tipos gradual, inferencia de tipos, interpolación de cadenas y sandboxing. Dentro de Roblox Studio, cada Script, LocalScript y ModuleScript se guarda en el disco como un archivo .luau. La extensión separada permite que los editores y linters reconozcan la sintaxis de Luau en lugar de tratarla como Lua ordinario. Más allá de Roblox, estudios como Remedy y Digital Extremes integran Luau en sus propios motores de juego, por lo que también puede encontrar archivos .luau fuera del mundo de Roblox.
Seguridad y protección
RIESGO: 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.
Detalles del formato
en pocas palabrasProgramas que abren archivos 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. Detalles técnicos
especificación profunda| 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. |
| Lanzado | 2019 |
| Última versión | N/A (rolling releases; no versioned file format) |
| Estándar abierto | Sí · libre de regalías |
| Especificación | luau.org |
Conversiones de LUAU
Preguntas y respuestas de la comunidad
preguntado por usuariosAún no hay preguntas; sea el primero en preguntar sobre los archivos LUAU.
Preguntas frecuentes
¿Qué es un archivo .luau?
¿Cómo abro un archivo .luau?
luau.¿Cuál es la diferencia entre .luau y .lua?
.luau marca los archivos escritos para el dialecto Luau de Roblox, que añade anotaciones de tipo y otras características. Roblox Studio guarda sus scripts como .luau, mientras que .lua es utilizado por el Lua estándar y exportaciones antiguas de Roblox.¿Puedo ejecutar un archivo .luau fuera de Roblox?
luau desde los lanzamientos de GitHub del proyecto y ejecute luau yourfile.luau. Los scripts que llaman a las API específicas de Roblox no funcionarán fuera del motor de Roblox.