pub trait Executable {
    fn load(
        &self,
        engine: &(dyn Engine + 'static)
    ) -> Result<Arc<dyn Artifact>, CompileError>; fn features(&self) -> Features; fn cpu_features(&self) -> EnumSet<CpuFeature>; fn serialize(&self) -> Result<Vec<u8>, Box<dyn Error + Send + Sync>>; fn function_name(&self, index: FunctionIndex) -> Option<&str>; }
Expand description

A WASM module built by some Engine.

Types implementing this trait are ready to be saved (to e.g. disk) for later use or loaded with the Engine to in order to produce an Artifact.

Required Methods

Load this executable with the specified engine.

TODO(0-copy): change error type here.

The features with which this Executable was built.

The CPU features this Executable requires.

Serializes the artifact into bytes

Obtain a best effort description for the function at the given function index.

Implementations are not required to maintain symbol names, so this may always return None.

Implementations

Downcast a dynamic Executable object to a concrete implementation of the trait.

Implementors