From b321f4d5c02e184a9e81a260689cdcfe1bac8b02 Mon Sep 17 00:00:00 2001 From: kajacx Date: Thu, 18 May 2023 15:01:32 +0200 Subject: [PATCH] Add compiler features to wai-bindgen-wasmer This enables using `wai-bindgen-wasmer` as a single dependency, without needing to include `wasmer` with the specified compiler. --- lib/wai-bindgen-wasmer/Cargo.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/wai-bindgen-wasmer/Cargo.toml b/lib/wai-bindgen-wasmer/Cargo.toml index ebdf5a1a021..0ec68317d1b 100644 --- a/lib/wai-bindgen-wasmer/Cargo.toml +++ b/lib/wai-bindgen-wasmer/Cargo.toml @@ -22,7 +22,7 @@ wasmer = { version = "=3.3.0", path = "../api", default-features = false } [features] # Enables generated code to emit events via the `tracing` crate whenever wasm is -# entered and when native functions are called. Note that tracin is currently +# entered and when native functions are called. Note that tracing is currently # only done for imported functions. tracing = ["tracing-lib", "wai-bindgen-wasmer-impl/tracing"] @@ -34,5 +34,10 @@ async = ["async-trait", "wai-bindgen-wasmer-impl/async"] js = ["wasmer/js", "wasmer/std"] sys = ["wasmer/sys"] +# Wasmer compiler (with `sys` feature only) +cranelift = ["wasmer/cranelift"] +singlepass = ["wasmer/singlepass"] +llvm = ["wasmer/llvm"] + [package.metadata.docs.rs] features = ["wasmer/sys"]