Cargo Features

wasmer = { version = "4.3.2", default-features = false, features = ["std", "core", "sys", "sys-default", "compiler", "singlepass", "cranelift", "llvm", "engine", "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?
core = hashbrown
sys compiler? engine? sys-default = std

Features for sys.

Enables compiler and translator of wasmer-compiler

Affects wasmer::sys, wasmer::Artifact, wasmer::EngineBuilder, wasmer::Features, wasmer::BaseTunables, wasmer::VMConfig

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

- Compilers.


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

- Engines.

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? = wasmparser
jsc = rusty_jsc, wasm-types-polyfill, wasmparser


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


Enables wasmer-artifact-load of wasmer-compiler


Enables wasmer-artifact-create of wasmer-compiler


Enables static-artifact-load of wasmer-compiler


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 2 major flavors:

  • sys, where wasmer will be compiled to a native executable which provides compilers, engines, a full VM etc.
  • js, where wasmer will be compiled to WebAssembly to run in a JavaScript host.

Shared dependencies.

wat sys-default

Enables wat =1.0.71

- 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.121.0