Skip to content

Commit

Permalink
only enable tail calls when _not_ using Winch
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbepop committed Jul 11, 2024
1 parent 883c41c commit fc17174
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vms/wasmtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ impl BenchVm for Wasmtime {
impl Wasmtime {
fn store(&self) -> wasmtime::Store<()> {
let mut config = wasmtime::Config::default();
config.wasm_tail_call(true);
if matches!(self.strategy, wasmtime::Strategy::Auto | wasmtime::Strategy::Cranelift) {
config.wasm_tail_call(true);
}
config.strategy(self.strategy);
let engine = wasmtime::Engine::new(&config).unwrap();
<wasmtime::Store<()>>::new(&engine, ())
Expand Down

0 comments on commit fc17174

Please sign in to comment.