mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Bump wasmtime to 5.0.0 (and a few other deps) (#13160)
* Bump `wasmtime` to 4.0.0 (and a few other deps) * Use `Error::msg` instead of `anyhow!` * Bump `wasmtime` to 5.0.0 * Update `Cargo.lock` * Add `wasmtime` feature to `sp-wasm-interface` dependency
This commit is contained in:
@@ -366,29 +366,27 @@ fn common_config(semantics: &Semantics) -> std::result::Result<wasmtime::Config,
|
||||
MAX_WASM_PAGES
|
||||
};
|
||||
|
||||
config.allocation_strategy(wasmtime::InstanceAllocationStrategy::Pooling {
|
||||
strategy: wasmtime::PoolingAllocationStrategy::ReuseAffinity,
|
||||
|
||||
let mut pooling_config = wasmtime::PoolingAllocationConfig::default();
|
||||
pooling_config
|
||||
.strategy(wasmtime::PoolingAllocationStrategy::ReuseAffinity)
|
||||
// Pooling needs a bunch of hard limits to be set; if we go over
|
||||
// any of these then the instantiation will fail.
|
||||
instance_limits: wasmtime::InstanceLimits {
|
||||
// Current minimum values for kusama (as of 2022-04-14):
|
||||
// size: 32384
|
||||
// table_elements: 1249
|
||||
// memory_pages: 2070
|
||||
size: 128 * 1024,
|
||||
table_elements: 8192,
|
||||
memory_pages,
|
||||
//
|
||||
// Current minimum values for kusama (as of 2022-04-14):
|
||||
// size: 32384
|
||||
// table_elements: 1249
|
||||
// memory_pages: 2070
|
||||
.instance_size(128 * 1024)
|
||||
.instance_table_elements(8192)
|
||||
.instance_memory_pages(memory_pages)
|
||||
// We can only have a single of those.
|
||||
.instance_tables(1)
|
||||
.instance_memories(1)
|
||||
// This determines how many instances of the module can be
|
||||
// instantiated in parallel from the same `Module`.
|
||||
.instance_count(32);
|
||||
|
||||
// We can only have a single of those.
|
||||
tables: 1,
|
||||
memories: 1,
|
||||
|
||||
// This determines how many instances of the module can be
|
||||
// instantiated in parallel from the same `Module`.
|
||||
count: 32,
|
||||
},
|
||||
});
|
||||
config.allocation_strategy(wasmtime::InstanceAllocationStrategy::Pooling(pooling_config));
|
||||
}
|
||||
|
||||
Ok(config)
|
||||
|
||||
Reference in New Issue
Block a user