Trait wasmtime_environ::CompilerBuilder
source · [−]pub trait CompilerBuilder: Send + Sync + Debug {
fn clone(&self) -> Box<dyn CompilerBuilder>ⓘNotable traits for Box<F, A>impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
;
fn target(&mut self, target: Triple) -> Result<()>;
fn triple(&self) -> &Triple;
fn set(&mut self, name: &str, val: &str) -> Result<()>;
fn enable(&mut self, name: &str) -> Result<()>;
fn settings(&self) -> Vec<Setting>;
fn build(&self) -> Result<Box<dyn Compiler>>;
}
Expand description
Abstract trait representing the ability to create a Compiler
below.
This is used in Wasmtime to separate compiler implementations, currently mostly used to separate Cranelift from Wasmtime itself.
Required methods
fn clone(&self) -> Box<dyn CompilerBuilder>ⓘNotable traits for Box<F, A>impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
fn clone(&self) -> Box<dyn CompilerBuilder>ⓘNotable traits for Box<F, A>impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
Like the Clone
trait, but for the boxed trait object.
Sets the target of compilation to the target specified.
Returns the currently configured target triple that compilation will produce artifacts for.
Compiler-specific method to configure various settings in the compiler itself.
This is expected to be defined per-compiler. Compilers should return errors for unknown names/values.
Compiler-specific method for configuring settings.
Same as CompilerBuilder::set
except for enabling boolean flags.
Currently cranelift uses this to sometimes enable a family of settings.
Returns a list of all possible settings that can be configured with
CompilerBuilder::set
and CompilerBuilder::enable
.