mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Bump wasmtime to 6.0.0 (#13429)
* Bump `wasmtime` to 6.0.0 * Disable cranelift egraphs
This commit is contained in:
@@ -298,6 +298,11 @@ fn common_config(semantics: &Semantics) -> std::result::Result<wasmtime::Config,
|
||||
config.cranelift_opt_level(wasmtime::OptLevel::SpeedAndSize);
|
||||
config.cranelift_nan_canonicalization(semantics.canonicalize_nans);
|
||||
|
||||
// Since wasmtime 6.0.0 the default for this is `true`, but that heavily regresses
|
||||
// the contracts pallet's performance, so disable it for now.
|
||||
#[allow(deprecated)]
|
||||
config.cranelift_use_egraphs(false);
|
||||
|
||||
let profiler = match std::env::var_os("WASMTIME_PROFILING_STRATEGY") {
|
||||
Some(os_string) if os_string == "jitdump" => wasmtime::ProfilingStrategy::JitDump,
|
||||
None => wasmtime::ProfilingStrategy::None,
|
||||
@@ -368,7 +373,7 @@ fn common_config(semantics: &Semantics) -> std::result::Result<wasmtime::Config,
|
||||
|
||||
let mut pooling_config = wasmtime::PoolingAllocationConfig::default();
|
||||
pooling_config
|
||||
.strategy(wasmtime::PoolingAllocationStrategy::ReuseAffinity)
|
||||
.max_unused_warm_slots(4)
|
||||
// Pooling needs a bunch of hard limits to be set; if we go over
|
||||
// any of these then the instantiation will fail.
|
||||
//
|
||||
@@ -680,10 +685,8 @@ where
|
||||
let mut linker = wasmtime::Linker::new(&engine);
|
||||
crate::imports::prepare_imports::<H>(&mut linker, &module, config.allow_missing_func_imports)?;
|
||||
|
||||
let mut store =
|
||||
crate::instance_wrapper::create_store(module.engine(), config.semantics.max_memory_size);
|
||||
let instance_pre = linker
|
||||
.instantiate_pre(&mut store, &module)
|
||||
.instantiate_pre(&module)
|
||||
.map_err(|e| WasmError::Other(format!("cannot preinstantiate module: {:#}", e)))?;
|
||||
|
||||
Ok(WasmtimeRuntime {
|
||||
|
||||
Reference in New Issue
Block a user