pub struct BuildFeatureFlags {
pub lto: bool,
pub pgo: bool,
pub simd: bool,
pub parallel_type_check: bool,
pub debug_assertions: bool,
pub incremental: bool,
pub sanitizers: Vec<String>,
}Expand description
Feature flags that can be toggled to change build behavior.
Fields§
§lto: boolEnable link-time optimization.
pgo: boolEnable profile-guided optimization.
simd: boolEnable SIMD instruction generation.
parallel_type_check: boolEnable experimental parallel type-checking.
debug_assertions: boolEnable debug assertions even in release builds.
incremental: boolEnable incremental compilation.
sanitizers: Vec<String>Enable sanitizers (address, memory, etc.).
Implementations§
Source§impl BuildFeatureFlags
impl BuildFeatureFlags
Sourcepub fn debug_defaults() -> Self
pub fn debug_defaults() -> Self
Create default flags for a debug build.
Sourcepub fn release_defaults() -> Self
pub fn release_defaults() -> Self
Create default flags for a release build.
Sourcepub fn with_sanitizer(self, name: &str) -> Self
pub fn with_sanitizer(self, name: &str) -> Self
Add a sanitizer.
Sourcepub fn has_sanitizers(&self) -> bool
pub fn has_sanitizers(&self) -> bool
Whether any sanitizers are active.
Trait Implementations§
Source§impl Clone for BuildFeatureFlags
impl Clone for BuildFeatureFlags
Source§fn clone(&self) -> BuildFeatureFlags
fn clone(&self) -> BuildFeatureFlags
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BuildFeatureFlags
impl Debug for BuildFeatureFlags
Source§impl Default for BuildFeatureFlags
impl Default for BuildFeatureFlags
Source§fn default() -> BuildFeatureFlags
fn default() -> BuildFeatureFlags
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BuildFeatureFlags
impl RefUnwindSafe for BuildFeatureFlags
impl Send for BuildFeatureFlags
impl Sync for BuildFeatureFlags
impl Unpin for BuildFeatureFlags
impl UnsafeUnpin for BuildFeatureFlags
impl UnwindSafe for BuildFeatureFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more