#[repr(C)]pub struct lua_CompileOptions {Show 13 fields
pub optimizationLevel: c_int,
pub debugLevel: c_int,
pub typeInfoLevel: c_int,
pub coverageLevel: c_int,
pub vectorLib: *const c_char,
pub vectorCtor: *const c_char,
pub vectorType: *const c_char,
pub mutableGlobals: *const *const c_char,
pub userdataTypes: *const *const c_char,
pub librariesWithKnownMembers: *const *const c_char,
pub libraryMemberTypeCb: Option<lua_LibraryMemberTypeCallback>,
pub libraryMemberConstantCb: Option<lua_LibraryMemberConstantCallback>,
pub disabledBuiltins: *const *const c_char,
}Expand description
Options to configure the Luau compiler with.
All memory pointed to by this struct must be valid for the duration of the
luau_compile call that this struct is passed to.
Fields§
§optimizationLevel: c_intWhat kind of optimizations the compiler should perform.
0: No optimizations. 1: Optimizations that do not impact debugging or debugging information. 2: Optimizations that may impact debugging or debugging information.
debugLevel: c_intThe amount of debug information to include in the compiled bytecode.
0: No debug information. 1: Line info and function names, sufficient for backtraces. 2: Full debug information including variable names.
typeInfoLevel: c_intThe type information to include in the compiled bytecode.
0: Emit type information only for native codegen. 1: Emit type information for all code.
coverageLevel: c_intThe amount of coverage information to include in the compiled bytecode.
0: No coverage information. 1: Coverage information for statements. 2: Coverage information for statements and expressions.
vectorLib: *const c_charAn alternative global used to construct vectors in addition to
vector.create.
This field is the library name. The constructor name is in
lua_CompileOptions::vectorCtor.
The full configured vector constructor is
<vectorLib>.<vectorCtor>(x, y, z).
vectorCtor: *const c_charThe name of the alternative vector constructor function.
This field is the constructor name. The library name is in
lua_CompileOptions::vectorLib.
The full configured vector constructor is
<vectorLib>.<vectorCtor>(x, y, z).
vectorType: *const c_charAn alternative name for the vector type in addition to vector.
mutableGlobals: *const *const c_charAn array of global names that are mutable globals.
The import optimization will be disabled for these globals. This array is null-terminated.
userdataTypes: *const *const c_charWaiting to document alongside lua_LibraryMemberTypeCallback
librariesWithKnownMembers: *const *const c_charAn array of global names that are libraries with known members.
This array is null-terminated.
libraryMemberTypeCb: Option<lua_LibraryMemberTypeCallback>A callback to retrieve the type of a member in a library.
libraryMemberConstantCb: Option<lua_LibraryMemberConstantCallback>A callback to retrieve the constant value of a member in a library.
disabledBuiltins: *const *const c_charAn array of global or library function names that are normally built-in to the language, but are disabled for this compilation.
This array contains members like “print” or “table.insert”. This array is null-terminated.