Cargo Features

[dependencies]
dusk-wasmtime = { version = "21.0.0-alpha", default-features = false, features = ["cranelift", "winch", "incremental-cache", "profiling", "parallel-compilation", "cache", "async", "pooling-allocator", "all-arch", "component-model", "wmemcheck", "demangle", "coredump", "debug-builtins", "runtime", "gc", "threads", "wat", "addr2line"] }

=============================================================================

Features for the Wasmtime crate.

This section contains the compile-time features of the wasmtime crate. These features can be used to add more functionality and APIs exposed from the crate's API. Most of them are enabled by default. Disabling features can be done to cut down on binary size by disabling features that are not required for a particular embedding.

default = addr2line, async, cache, component-model, coredump, cranelift, debug-builtins, demangle, gc, parallel-compilation, pooling-allocator, profiling, runtime, threads, wat

These default features are set whenever dusk-wasmtime is added without default-features = false somewhere in the dependency tree.

cranelift default

An on-by-default feature enabling runtime compilation of WebAssembly modules with the Cranelift compiler. Cranelift is the default compilation backend of Wasmtime. If disabled then WebAssembly modules can only be created from precompiled WebAssembly modules.

Enables dusk-wasmtime-cranelift

Affects serialization::append_compiler_info, func::create_array_call_function

winch

Enables support for winch, the WebAssembly baseline compiler. The Winch compiler strategy in Config will be available. It is currently in active development and shouldn't be used in production applications.

Enables wasmtime-winch =20.0.0

Affects serialization::append_compiler_info, func::create_array_call_function

incremental-cache

Enables support for incremental compilation cache to be enabled in Config.

Enables incremental-cache of optional dusk-wasmtime-cranelift

profiling default

Enables support for profiling guest modules.

Enables fxprof-processed-profile ^0.6.0, ittapi, and wasmtime-jit-debug =20.0.0

Affects profiling::GuestProfiler

parallel-compilation default

Enables parallel compilation of WebAssembly code.

Enables rayon

cache default

Enables support for automatic cache configuration to be enabled in Config.

Enables wasmtime-cache =20.0.0

async default = runtime

Enables support for "async stores" as well as defining host functions as async fn and calling functions asynchronously.

Enables async-trait, wasmtime-fiber =20.0.0, async of dusk-wasmtime-runtime, async of optional wasmtime-component-macro =20.0.0

Affects limits::ResourceLimiterAsync, store::CallHookHandler, store::AsyncCx

pooling-allocator default = runtime

Enables support for the pooling instance allocation strategy

Enables pooling-allocator of dusk-wasmtime-runtime

Affects config::PoolingAllocationConfig

all-arch

Enables support for all architectures in Cranelift, allowing cross-compilation using the wasmtime crate's API, notably the Engine::precompile_module function.

Enables all-arch of optional dusk-wasmtime-cranelift and optional wasmtime-winch =20.0.0

component-model default

Enables in-progress support for the component model. Note that this feature is in-progress, buggy, and incomplete. This is primarily here for internal testing purposes.

Enables encoding_rs, semver, wasmtime-component-macro =20.0.0, and wasmtime-component-util =20.0.0, component-model of dusk-wasmtime-environ, optional dusk-wasmtime-cranelift, optional dusk-wasmtime-runtime, and optional wasmtime-winch =20.0.0

Affects runtime::component

wmemcheck

Enables wmemcheck of optional dusk-wasmtime-cranelift and optional dusk-wasmtime-runtime

demangle default

Enables support for demangling WebAssembly function names at runtime in errors such as backtraces.

Enables demangle of dusk-wasmtime-environ

coredump default = runtime

Enable support for generating core dumps on traps.

Enables wasm-encoder ^0.202.0, coredump of dusk-wasmtime-runtime

debug-builtins default

Export some symbols from the final binary to assist in debugging Cranelift-generated code with native debuggers like GDB and LLDB.

Enables debug-builtins of optional dusk-wasmtime-runtime

runtime default async coredump pooling-allocator

Enable support for executing compiled Wasm modules.

Enables wasmtime-jit-icache-coherence =20.0.0, dusk-wasmtime-runtime, and wasmtime-slab =20.0.0

gc default

Enable support for garbage collection-related things.

This Cargo feature is required to compile or run Wasm that uses any of the following Wasm proposals:

When a compiler Cargo feature (cranelift or winch) is enabled, this feature gates the ability to compile Wasm that uses those proposals.

When the runtime Cargo feature is enabled, this feature gates the ability to load and run Wasm that uses those proposals.

Enables gc of optional dusk-wasmtime-cranelift, dusk-wasmtime-environ, and optional dusk-wasmtime-runtime

threads default

Enable runtime support for the WebAssembly threads proposal.

Enables threads of optional dusk-wasmtime-cranelift and optional dusk-wasmtime-runtime

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.

wat default
addr2line default

Enables addr2line ^0.21.0

Support address-to-file/line information in traps when wasm files have DWARF debugging information.

Affects instantiate::SymbolizeContext