[][src]Module wasmer::compiler

Types and functions for compiling wasm;

Structs

BackendCompilerConfig

Use this to point to a compiler config struct provided by the backend. The backend struct must support runtime reflection with Any, which is any struct that does not contain a non-'static reference.

CodeVersion

A CodeVersion is a container for a unit of generated code for a module.

CompilerConfig

Configuration data for the compiler

Features

Controls which experimental features will be enabled. Features usually have a corresponding WebAssembly proposal.

Enums

Backend

Enum used to select which compiler should be used to generate code.

Traits

Compiler

Functions

compile

Compile WebAssembly binary code into a Module. This function is useful if it is necessary to compile a module before it can be instantiated (otherwise, the instantiate function should be used).

compile_with

Compile a Module using the provided compiler from WebAssembly binary code. This function is useful if it is necessary to a compile a module before it can be instantiated and must be used if you wish to use a different backend from the default.

compile_with_config

The same as compile but takes a CompilerConfig for the purpose of changing the compiler's behavior

compile_with_config_with

The same as compile_with_config but takes a Compiler for the purpose of changing the backend.

compiler_for_backend

Get the Compiler as a trait object for the given Backend. Returns Option because support for the requested Compiler may not be enabled by feature flags.

default_compiler

Copied from runtime core; TODO: figure out what we want to do here

pop_code_version

Pops a CodeVersion from the current code versions.

push_code_version

Pushes a new CodeVersion to the current code versions.