Cargo Features

[dependencies]
wasmer = { version = "5.0.4", default-features = false, features = ["std", "core", "artifact-size", "sys", "sys-default", "compiler", "singlepass", "cranelift", "llvm", "engine", "wamr", "wasmi", "v8", "wasm-c-api", "jit", "js", "js-default", "wasm-types-polyfill", "jsc", "js-serializable-module", "enable-serde", "wasmer-artifact-load", "wasmer-artifact-create", "static-artifact-load", "static-artifact-create"] }
default = sys-default

The sys-default feature is set by default whenever wasmer is added without default-features = false somewhere in the dependency tree.

std js-default? sys? v8? wamr? wasmi?
core = hashbrown
artifact-size

Enables loupe, artifact-size of wasmer-compiler and wasmer-vm

sys compiler? engine? sys-default = std

Features for sys.

Enables compiler and translator of wasmer-compiler

Affects wasmer::sys

sys-default default = cranelift, sys, wat
compiler cranelift? llvm? singlepass? = sys

- Compilers.

Affects engine::NativeEngineExt.new

singlepass = compiler, wasmer-compiler-singlepass
cranelift sys-default = compiler, wasmer-compiler-cranelift
llvm = compiler, wasmer-compiler-llvm
engine jit? = sys

- Engines.

wamr = std, wasm-c-api, wat

Affects as_c::param_from_c

wasmi = std, wasm-c-api, wat

Enables wasmi_c_api_impl ^0.38.0

Affects as_c::param_from_c

v8 = std, wasm-c-api, wat

Enables seq-macro

Affects as_c::param_from_c

wasm-c-api v8? wamr? wasmi? = wasm-types-polyfill
jit = engine

- Deprecated features.

js js-default? = js-sys, wasm-bindgen

Features for js.

js-default = js, std, wasm-types-polyfill
wasm-types-polyfill js-default? jsc? wasm-c-api? = wasmparser
jsc = rusty_jsc, wasm-types-polyfill, wasmparser
js-serializable-module
enable-serde

Optional

Enables enable-serde of wasmer-compiler, wasmer-types, and wasmer-vm

wasmer-artifact-load

Enables wasmer-artifact-load of wasmer-compiler

wasmer-artifact-create

Enables wasmer-artifact-create of wasmer-compiler

static-artifact-load

Enables static-artifact-load of wasmer-compiler

static-artifact-create

Enables static-artifact-create of wasmer-compiler

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

This crate comes in 3 major flavors:

  • sys, where wasmer will be compiled to a native executable which provides compilers, engines, a full VM etc.
  • wamr, where wasmer will be compiled to a native executable which provides an interpreter using WAMR as a backend.
  • wasmi, where wasmer will be compiled to a native executable which provides an interpreter using wasmi as a backend.
  • v8, where wasmer will be compiled to a native executable using v8 as a backend.
  • js, where wasmer will be compiled to WebAssembly to run in a JavaScript host.

Shared dependencies.

wat sys-default v8? wamr? wasmi?

Enables wat

- Optional shared dependencies.

hashbrown wasm32 core?

Enables hashbrown ^0.11

js-sys not wasm32 wasm32 js?
rusty_jsc not wasm32 jsc?
wasm-bindgen not wasm32 wasm32 js?
wasmer-compiler-cranelift not wasm32 cranelift?
wasmer-compiler-llvm not wasm32 llvm?
wasmer-compiler-singlepass not wasm32 singlepass?
wasmparser not wasm32 wasm32 jsc? wasm-types-polyfill?

Enables wasmparser ^0.216.0