Disable stacker on WASM

This commit is contained in:
Laurenz 2023-04-24 15:20:08 +02:00
parent bc802bd8fb
commit 3cc0f1ef0d
2 changed files with 9 additions and 3 deletions

View File

@ -53,6 +53,8 @@ usvg = { version = "0.22", default-features = false, features = ["text"] }
xmp-writer = "0.1"
tracing = "0.1.37"
indexmap = "1.9.3"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
stacker = "0.1.15"
[profile.dev]

View File

@ -1119,10 +1119,14 @@ impl Eval for ast::FuncCall {
let callee = callee.cast::<Func>().at(callee_span)?;
let point = || Tracepoint::Call(callee.name().map(Into::into));
let f = || callee.call_vm(vm, args).trace(vm.world(), point, span);
stacker::maybe_grow(32 * 1024, 2 * 1024 * 1024, || {
callee.call_vm(vm, args).trace(vm.world(), point, span)
})
// Stacker is broken on WASM.
#[cfg(target_arch = "wasm32")]
return f();
#[cfg(not(target_arch = "wasm32"))]
stacker::maybe_grow(32 * 1024, 2 * 1024 * 1024, f)
}
}