mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Disable stacker on WASM
This commit is contained in:
parent
bc802bd8fb
commit
3cc0f1ef0d
@ -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]
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user