pub trait NativeWasmType: Sized {
    type Abi: Copy + Debug;

    const WASM_TYPE: Type;
}
Expand description

NativeWasmType represents a Wasm type that has a direct representation on the host (hence the “native” term).

It uses the Rust Type system to automatically detect the Wasm type associated with a native Rust type.

use wasmer_types::{NativeWasmType, Type};

let wasm_type = i32::WASM_TYPE;
assert_eq!(wasm_type, Type::I32);

Note: This strategy will be needed later to automatically detect the signature of a Rust function.

Required Associated Types

The ABI for this type (i32, i64, f32, f64)

Required Associated Constants

Type for this NativeWasmType.

Implementations on Foreign Types

Implementors