pub struct Singlepass {
pub(crate) enable_nan_canonicalization: bool,
pub(crate) allow_experimental_unaligned_memory_accesses: bool,
pub(crate) debugger: Option<Debugger>,
pub(crate) experimental_artifact: bool,
pub(crate) middlewares: Vec<Arc<dyn ModuleMiddleware>>,
pub(crate) callbacks: Option<SinglepassCallbacks>,
pub num_threads: NonZero<usize>,
}Fields§
§enable_nan_canonicalization: bool§allow_experimental_unaligned_memory_accesses: bool§debugger: Option<Debugger>§experimental_artifact: bool§middlewares: Vec<Arc<dyn ModuleMiddleware>>The middleware chain.
callbacks: Option<SinglepassCallbacks>§num_threads: NonZero<usize>The number of threads to use for compilation.
Implementations§
Source§impl Singlepass
impl Singlepass
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new configuration object with the default configuration specified.
Sourcepub fn experimental_artifact(&mut self, enable: bool) -> &mut Self
pub fn experimental_artifact(&mut self, enable: bool) -> &mut Self
Enable the experimental artifact format.
pub fn canonicalize_nans(&mut self, enable: bool) -> &mut Self
Sourcepub fn allow_experimental_unaligned_memory_accesses(
&mut self,
enable: bool,
) -> &mut Self
pub fn allow_experimental_unaligned_memory_accesses( &mut self, enable: bool, ) -> &mut Self
Enable run-time handling of potentially unaligned memory accesses. Unaligned memory accesses occur when you try to read N bytes of data starting from an address that is not evenly divisible by N.
This feature is experimental and currently supports only Cranelift scalar types and Singlepass on RISC-V for integral types.
Sourcepub fn callbacks(&mut self, callbacks: Option<SinglepassCallbacks>) -> &mut Self
pub fn callbacks(&mut self, callbacks: Option<SinglepassCallbacks>) -> &mut Self
Callbacks that will triggered in the different compilation phases in Singlepass.
Sourcepub fn num_threads(&mut self, num_threads: NonZero<usize>) -> &mut Self
pub fn num_threads(&mut self, num_threads: NonZero<usize>) -> &mut Self
Set the number of threads to use for compilation.
Trait Implementations§
Source§impl Clone for Singlepass
impl Clone for Singlepass
Source§fn clone(&self) -> Singlepass
fn clone(&self) -> Singlepass
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CompilerConfig for Singlepass
impl CompilerConfig for Singlepass
Source§fn supported_features_for_target(&self, _target: &Target) -> Features
fn supported_features_for_target(&self, _target: &Target) -> Features
Gets the supported features for this compiler in the given target
Source§fn push_middleware(&mut self, middleware: Arc<dyn ModuleMiddleware>)
fn push_middleware(&mut self, middleware: Arc<dyn ModuleMiddleware>)
Pushes a middleware onto the back of the middleware chain.
Source§fn experimental_artifact(&mut self, enable: bool)
fn experimental_artifact(&mut self, enable: bool)
Source§fn enable_pic(&mut self)
fn enable_pic(&mut self)
Source§fn enable_debugger(&mut self, debugger: Debugger)
fn enable_debugger(&mut self, debugger: Debugger)
§fn enable_verifier(&mut self)
fn enable_verifier(&mut self)
§fn enable_perfmap(&mut self)
fn enable_perfmap(&mut self)
§fn enable_non_volatile_memops(&mut self)
fn enable_non_volatile_memops(&mut self)
§fn enable_experimental_unaligned_memory_accesses(&mut self)
fn enable_experimental_unaligned_memory_accesses(&mut self)
§fn enable_readonly_funcref_table(&mut self)
fn enable_readonly_funcref_table(&mut self)
§fn canonicalize_nans(&mut self, _enable: bool)
fn canonicalize_nans(&mut self, _enable: bool)
§fn default_features_for_target(&self, target: &Target) -> Features
fn default_features_for_target(&self, target: &Target) -> Features
Source§impl Debug for Singlepass
impl Debug for Singlepass
Source§impl Default for Singlepass
impl Default for Singlepass
Source§fn default() -> Singlepass
fn default() -> Singlepass
Source§impl From<Singlepass> for Engine
impl From<Singlepass> for Engine
Source§fn from(config: Singlepass) -> Self
fn from(config: Singlepass) -> Self
Auto Trait Implementations§
impl Freeze for Singlepass
impl !RefUnwindSafe for Singlepass
impl Send for Singlepass
impl Sync for Singlepass
impl Unpin for Singlepass
impl UnsafeUnpin for Singlepass
impl !UnwindSafe for Singlepass
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more