pub struct Options { /* private fields */ }
Expand description
Options that can be provided to the compiler.
See Build::with_options.
Implementations§
Source§impl Options
impl Options
Sourcepub fn from_default_env() -> Result<Self, ParseOptionError>
pub fn from_default_env() -> Result<Self, ParseOptionError>
Construct lossy rune options from the RUNEFLAGS
environment variable.
Sourcepub fn available() -> &'static [OptionMeta]
pub fn available() -> &'static [OptionMeta]
Get a list and documentation for all available compiler options.
Sourcepub fn parse_option(&mut self, option: &str) -> Result<(), ParseOptionError>
pub fn parse_option(&mut self, option: &str) -> Result<(), ParseOptionError>
Parse a compiler option. This is the function which parses the
<option>[=<value>]
syntax, which is used by among other things the
Rune CLI with the -O <option>[=<value>]
option.
It can be used to consistenly parse a collection of options by other programs as well.
Sourcepub fn debug_info(&mut self, enabled: bool)
pub fn debug_info(&mut self, enabled: bool)
Set if debug info is enabled or not. Defaults to true
.
Sourcepub fn link_checks(&mut self, enabled: bool)
pub fn link_checks(&mut self, enabled: bool)
Set if link checks are enabled or not. Defaults to true
. This will
cause compilation to fail if an instruction references a function which
does not exist.
Sourcepub fn bytecode(&mut self, enabled: bool)
pub fn bytecode(&mut self, enabled: bool)
Set if bytecode caching is enabled or not. Defaults to false
.
Sourcepub fn memoize_instance_fn(&mut self, enabled: bool)
pub fn memoize_instance_fn(&mut self, enabled: bool)
Memoize the instance function in a loop. Defaults to false
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)