Compile()
Function info¶
function LuauInLuau.Compile(src: string, optimizationlevel: number?, debuglevel: number?): (success: boolean, bytecode: string, bytecodelength: number)
Compiles src
into Luau bytecode if there are no syntax/compile errors
Arguments¶
src: string
- The sourceoptimizationlevel: number?
- The optimization level for the resulting bytecodedebuglevel: number?
- The debug level for the resulting bytecode
Important note regarding the optimization and debug level arguments
The optimizationlevel
and debuglevel
argument is only available starting with LuauInLuau v0.579
Returns¶
success: boolean
- Indicates whether the compiler successfully compiledsrc
into bytecode or notbytecode: string
- The bytecodebytecodelength: number
- The bytecode length