Cargo Features

[dependencies]
hc-wasmer = { version = "4.3.6-hc.1", default-features = false, features = ["std", "core", "sys", "sys-default", "compiler", "singlepass", "cranelift", "llvm", "engine", "wamr", "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 hc-wasmer is added without default-features = false somewhere in the dependency tree.

std js-default? sys? wamr?
core = hashbrown
sys compiler? engine? sys-default = std

Features for sys.

Enables compiler and translator of hc-wasmer-compiler

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

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
wasm-c-api wamr? = 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 hc-wasmer-compiler, hc-wasmer-types, and hc-wasmer-vm

wasmer-artifact-load

Enables wasmer-artifact-load of hc-wasmer-compiler

wasmer-artifact-create

Enables wasmer-artifact-create of hc-wasmer-compiler

static-artifact-load

Enables static-artifact-load of hc-wasmer-compiler

static-artifact-create

Enables static-artifact-create of hc-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.
  • js, where wasmer will be compiled to WebAssembly to run in a JavaScript host.

Shared dependencies.

wat sys-default wamr?

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?

Enables hc-wasmer-compiler-cranelift

wasmer-compiler-llvm not wasm32 llvm?

Enables hc-wasmer-compiler-llvm

wasmer-compiler-singlepass not wasm32 singlepass?

Enables hc-wasmer-compiler-singlepass

wasmparser not wasm32 wasm32 jsc? wasm-types-polyfill?

Enables wasmparser ^0.121.0