Struct rune::Options[][src]

pub struct Options {
    pub bytecode: bool,
    pub cfg_test: bool,
    pub v2: bool,
    // some fields omitted
}

Compiler 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

impl Options[src]

pub fn parse_option(&mut self, option: &str) -> Result<(), ConfigurationError>[src]

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.

pub fn test(&mut self, enabled: bool)[src]

Enable the test configuration flag

pub fn debug_info(&mut self, enabled: bool)[src]

Set if debug info is enabled or not. Defaults to true.

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.

pub fn macros(&mut self, enabled: bool)[src]

Set if macros are enabled or not. Defaults to false.

pub fn bytecode(&mut self, enabled: bool)[src]

Set if bytecode caching is enabled or not. Defaults to false.

pub fn memoize_instance_fn(&mut self, enabled: bool)[src]

Memoize the instance function in a loop. Defaults to false.

Trait Implementations

impl Clone for Options[src]

impl Copy for Options[src]

impl Debug for Options[src]

impl Default for Options[src]

Auto Trait Implementations

impl RefUnwindSafe for Options

impl Send for Options

impl Sync for Options

impl Unpin for Options

impl UnwindSafe for Options

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.