Skip to content

Commit

Permalink
Merge pull request #14 from wasmi-labs/rf-disable-tail-calls-for-winch
Browse files Browse the repository at this point in the history
Only enable `tail-calls` when _not_ using Winch for Wasmtime
  • Loading branch information
Robbepop authored Oct 30, 2024
2 parents b504772 + 57cb394 commit 6feecb8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/vms/wasmtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ 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 6feecb8

Please sign in to comment.