pub struct Options {
pub bytecode: bool,
pub cfg_test: bool,
pub v2: bool,
/* private fields */
}
Expand description
Options that can be provided to the compiler.
See Build::with_options.
Fields§
§bytecode: bool
Support (experimental) bytecode caching.
cfg_test: bool
Compile for and enable test features
v2: bool
Use the second version of the compiler in parallel.
Implementations§
source§impl Options
impl 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
.