pub struct CompileOptions {
pub opt_level: u8,
pub debug_info: bool,
pub strip: bool,
pub target_version: Option<String>,
pub flags: HashMap<String, String>,
pub source_name: Option<String>,
}Expand description
Options for compilation.
Fields§
§opt_level: u8Optimization level (0-3).
debug_info: boolWhether to include debug information.
strip: boolWhether to strip symbols.
target_version: Option<String>Target Fusabi version.
flags: HashMap<String, String>Custom compiler flags.
source_name: Option<String>Source file name (for error messages).
Implementations§
Source§impl CompileOptions
impl CompileOptions
Sourcepub fn with_opt_level(self, level: u8) -> Self
pub fn with_opt_level(self, level: u8) -> Self
Set optimization level.
Sourcepub fn with_debug_info(self) -> Self
pub fn with_debug_info(self) -> Self
Enable debug information.
Sourcepub fn with_strip(self) -> Self
pub fn with_strip(self) -> Self
Enable symbol stripping.
Sourcepub fn with_target_version(self, version: impl Into<String>) -> Self
pub fn with_target_version(self, version: impl Into<String>) -> Self
Set target version.
Sourcepub fn with_flag(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn with_flag(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a custom flag.
Sourcepub fn with_source_name(self, name: impl Into<String>) -> Self
pub fn with_source_name(self, name: impl Into<String>) -> Self
Set source name for error messages.
Sourcepub fn development() -> Self
pub fn development() -> Self
Create options optimized for development.
Sourcepub fn production() -> Self
pub fn production() -> Self
Create options optimized for production.
Trait Implementations§
Source§impl Clone for CompileOptions
impl Clone for CompileOptions
Source§fn clone(&self) -> CompileOptions
fn clone(&self) -> CompileOptions
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 CompileOptions
impl Debug for CompileOptions
Source§impl Default for CompileOptions
impl Default for CompileOptions
Source§fn default() -> CompileOptions
fn default() -> CompileOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompileOptions
impl RefUnwindSafe for CompileOptions
impl Send for CompileOptions
impl Sync for CompileOptions
impl Unpin for CompileOptions
impl UnwindSafe for CompileOptions
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