mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +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"
|
xmp-writer = "0.1"
|
||||||
tracing = "0.1.37"
|
tracing = "0.1.37"
|
||||||
indexmap = "1.9.3"
|
indexmap = "1.9.3"
|
||||||
|
|
||||||
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
stacker = "0.1.15"
|
stacker = "0.1.15"
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
|
@ -1119,10 +1119,14 @@ impl Eval for ast::FuncCall {
|
|||||||
|
|
||||||
let callee = callee.cast::<Func>().at(callee_span)?;
|
let callee = callee.cast::<Func>().at(callee_span)?;
|
||||||
let point = || Tracepoint::Call(callee.name().map(Into::into));
|
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, || {
|
// Stacker is broken on WASM.
|
||||||
callee.call_vm(vm, args).trace(vm.world(), point, span)
|
#[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