diff --git a/crates/cli/src/context.rs b/crates/cli/src/context.rs index f22d08e320..cecc048ae7 100644 --- a/crates/cli/src/context.rs +++ b/crates/cli/src/context.rs @@ -30,8 +30,6 @@ impl Context { compilation_mode: CompilationMode, ) -> Result { let mut config = Config::default(); - config.wasm_tail_call(true); - config.wasm_extended_const(true); if fuel.is_some() { config.consume_fuel(true); } diff --git a/crates/wasmi/src/engine/config.rs b/crates/wasmi/src/engine/config.rs index 4deeed2632..cce8a76181 100644 --- a/crates/wasmi/src/engine/config.rs +++ b/crates/wasmi/src/engine/config.rs @@ -176,8 +176,8 @@ impl Default for Config { multi_value: true, bulk_memory: true, reference_types: true, - tail_call: false, - extended_const: false, + tail_call: true, + extended_const: true, floats: true, consume_fuel: false, fuel_costs: FuelCosts::default(), diff --git a/crates/wasmi/src/func/into_func.rs b/crates/wasmi/src/func/into_func.rs index 2da45e3624..bc167f7c0d 100644 --- a/crates/wasmi/src/func/into_func.rs +++ b/crates/wasmi/src/func/into_func.rs @@ -180,6 +180,8 @@ impl_wasm_type! { type i64 = I64; type F32 = F32; type F64 = F64; + type f32 = F32; + type f64 = F64; type FuncRef = FuncRef; type ExternRef = ExternRef; } diff --git a/crates/wasmi/src/store.rs b/crates/wasmi/src/store.rs index 41f4c9ab51..92a52c45a1 100644 --- a/crates/wasmi/src/store.rs +++ b/crates/wasmi/src/store.rs @@ -822,6 +822,21 @@ impl StoreInner { } } +impl Default for Store +where + T: Default, +{ + fn default() -> Self { + let engine = Engine::default(); + Self { + inner: StoreInner::new(&engine), + trampolines: Arena::new(), + data: T::default(), + limiter: None, + } + } +} + impl Store { /// Creates a new store. pub fn new(engine: &Engine, data: T) -> Self {