[][src]Enum substrate_wasmtime::Strategy

#[non_exhaustive]pub enum Strategy {
    Auto,
    Cranelift,
    Lightbeam,
}

Possible Compilation strategies for a wasm module.

This is used as an argument to the Config::strategy method.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Auto

An indicator that the compilation strategy should be automatically selected.

This is generally what you want for most projects and indicates that the wasmtime crate itself should make the decision about what the best code generator for a wasm module is.

Currently this always defaults to Cranelift, but the default value will change over time.

Cranelift

Currently the default backend, Cranelift aims to be a reasonably fast code generator which generates high quality machine code.

Lightbeam

A single-pass code generator that is faster than Cranelift but doesn't produce as high-quality code.

To successfully pass this argument to Config::strategy the lightbeam feature of this crate must be enabled.

Trait Implementations

impl Clone for Strategy[src]

impl Debug for Strategy[src]

Auto Trait Implementations

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> Same<T> for T

type Output = T

Should always be Self

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.