pub struct Compiler { /* private fields */ }
This is supported on crate feature
luau
only.Expand description
Luau compiler
Implementations
sourceimpl Compiler
impl Compiler
sourcepub fn set_optimization_level(&mut self, level: u8) -> &mut Self
pub fn set_optimization_level(&mut self, level: u8) -> &mut Self
Sets Luau compiler optimization level.
Possible values:
- 0 - no optimization
- 1 - baseline optimization level that doesn’t prevent debuggability (default)
- 2 - includes optimizations that harm debuggability such as inlining
sourcepub fn set_debug_level(&mut self, level: u8) -> &mut Self
pub fn set_debug_level(&mut self, level: u8) -> &mut Self
Sets Luau compiler debug level.
Possible values:
- 0 - no debugging support
- 1 - line info & function names only; sufficient for backtraces (default)
- 2 - full debug info with local & upvalue names; necessary for debugger
sourcepub fn set_coverage_level(&mut self, level: u8) -> &mut Self
pub fn set_coverage_level(&mut self, level: u8) -> &mut Self
Sets Luau compiler code coverage level.
Possible values:
- 0 - no code coverage support (default)
- 1 - statement coverage
- 2 - statement and expression coverage (verbose)
sourcepub fn set_mutable_globals(&mut self, globals: Vec<String>) -> &mut Self
pub fn set_mutable_globals(&mut self, globals: Vec<String>) -> &mut Self
Sets a list of globals that are mutable.
It disables the import optimization for fields accessed through these.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Compiler
impl Send for Compiler
impl Sync for Compiler
impl Unpin for Compiler
impl UnwindSafe for Compiler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more