From 89c57da20b238c7e306f520271b7552587fd43aa Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Wed, 8 Mar 2023 11:12:12 +0100 Subject: [PATCH 1/2] Fix doc, threads are enabled by default now --- lib/c-api/src/wasm_c_api/unstable/features.rs | 4 ++-- lib/cli/src/common.rs | 6 +++--- lib/cli/src/store.rs | 5 ++++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/c-api/src/wasm_c_api/unstable/features.rs b/lib/c-api/src/wasm_c_api/unstable/features.rs index 349e69f704b..b00cffb5b0b 100644 --- a/lib/c-api/src/wasm_c_api/unstable/features.rs +++ b/lib/c-api/src/wasm_c_api/unstable/features.rs @@ -72,12 +72,12 @@ pub extern "C" fn wasmer_features_delete(_features: Option Result { - if self.features.threads || self.features.all { + if !self.features.disable_threads || self.features.all { features.threads(true); } + if self.features.disable_threads && !self.features.all { + features.threads(false); + } if self.features.multi_value || self.features.all { features.multi_value(true); } From 51697bf11ca5a3bb552e8e60e7004c027f255787 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Wed, 8 Mar 2023 12:09:19 +0100 Subject: [PATCH 2/2] Do not remove enable-thread, just mark at as deprecated --- lib/cli/src/common.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cli/src/common.rs b/lib/cli/src/common.rs index fdb277c4ff6..a4fd8eb1ccf 100644 --- a/lib/cli/src/common.rs +++ b/lib/cli/src/common.rs @@ -17,6 +17,10 @@ pub struct WasmFeatures { #[clap(long = "disable-threads")] pub disable_threads: bool, + /// Deprecated, threads are enabled by default. + #[clap(long = "enable-threads")] + pub _threads: bool, + /// Enable support for the reference types proposal. #[clap(long = "enable-reference-types")] pub reference_types: bool,