lua_CompileOptions

Struct lua_CompileOptions 

Source
#[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_int

What 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_int

The 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_int

The 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_int

The 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_char

An 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_char

The 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_char

An alternative name for the vector type in addition to vector.

§mutableGlobals: *const *const c_char

An 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_char

Waiting to document alongside lua_LibraryMemberTypeCallback

§librariesWithKnownMembers: *const *const c_char

An 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_char

An 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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.