CompilerConfig

Struct CompilerConfig 

Source
pub struct CompilerConfig {
Show 13 fields pub symbol_map: Option<HashMap<u32, String>>, pub memory_bound_check_mode: MemoryBoundCheckMode, pub enforce_stack_check: bool, pub track_state: bool, pub full_preemption: bool, pub nan_canonicalization: bool, pub enable_verification: bool, pub features: Features, pub triple: Option<String>, pub cpu_name: Option<String>, pub cpu_features: Option<String>, pub backend_specific_config: Option<BackendCompilerConfig>, pub generate_debug_info: bool,
}
Expand description

Configuration data for the compiler

Fields§

§symbol_map: Option<HashMap<u32, String>>

Symbol information generated from emscripten; used for more detailed debug messages

§memory_bound_check_mode: MemoryBoundCheckMode

How to make the decision whether to emit bounds checks for memory accesses.

§enforce_stack_check: bool

Whether to generate explicit native stack checks against stack_lower_bound in InternalCtx.

Usually it’s adequate to use hardware memory protection mechanisms such as mprotect on Unix to prevent stack overflow. But for low-level environments, e.g. the kernel, faults are generally not expected and relying on hardware memory protection would add too much complexity.

§track_state: bool

Whether to enable state tracking. Necessary for managed mode.

§full_preemption: bool

Whether to enable full preemption checkpoint generation.

This inserts checkpoints at critical locations such as loop backedges and function calls, allowing preemptive unwinding/task switching.

When enabled there can be a small amount of runtime performance overhead.

§nan_canonicalization: bool

Always choose a unique bit representation for NaN. Enabling this makes execution deterministic but increases runtime overhead.

§enable_verification: bool

Turns on verification that is done by default when debug_assertions are enabled (for example in ‘debug’ builds). Disabling this flag will make compilation faster in debug mode at the cost of not detecting bugs in the compiler.

These verifications are disabled by default in ‘release’ builds.

§features: Features§triple: Option<String>§cpu_name: Option<String>§cpu_features: Option<String>§backend_specific_config: Option<BackendCompilerConfig>§generate_debug_info: bool

Trait Implementations§

Source§

impl Debug for CompilerConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for CompilerConfig

Source§

fn default() -> CompilerConfig

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.