Struct wasmedge_sys::Compiler

source ·
pub struct Compiler { /* private fields */ }
Expand description

Defines WasmEdge ahead-of-time(AOT) compiler and the relevant APIs.

Implementations§

Creates a new AOT compiler.

Error

If fail to create a AOT compiler, then an error is returned.

Compiles the input WASM from the given file path for the AOT mode and stores the result to the output file path.

Arguments
  • wasm_file - The input wasm file, of which the file extension should be one of wasm orwat.

  • aot_file - The generated AOT wasm file, of which the file extension should be dylib on macOS, so on Linux or dll on Windows.

Error

If fail to compile, then an error is returned.

Compiles the input WASM from the given bytes for the AOT mode and stores the result to the output file path.

Argument
  • wasm_bytes - The in-memory WASM bytes.

  • aot_file - The generated AOT wasm file, of which the file extension should be dylib on macOS, so on Linux or dll on Windows.

Error

If fail to compile, then an error is returned.

Provides a raw pointer to the inner Compiler context.

Trait Implementations§

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.