Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wasmtime-backend): host stack size for WASM modules runtime has been increased to manage with AIR fold over 1023 elements in AquaVM #390

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion crates/wasmtime-backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ use marine_wasm_backend_traits::prelude::*;

use wasmtime_wasi::WasiCtx;

const MB: usize = 1024 * 1024;

#[derive(Clone, Default)]
pub struct WasmtimeWasmBackend {
engine: wasmtime::Engine,
Expand All @@ -61,7 +63,8 @@ impl WasmBackend for WasmtimeWasmBackend {
let mut config = wasmtime::Config::new();
config
.debug_info(false)
.wasm_backtrace_details(wasmtime::WasmBacktraceDetails::Enable);
.wasm_backtrace_details(wasmtime::WasmBacktraceDetails::Enable)
.max_wasm_stack(2 * MB);
let engine =
wasmtime::Engine::new(&config).map_err(WasmBackendError::InitializationError)?;

Expand Down