mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 00:28:01 +00:00
Refactor NativeExecutor to support multiple Wasm execution methods (#3677)
* executor: Move definitions of externals out of wasm_executor module. * executor: Create WasmRuntime trait. This will be used to decouple the runtime cache from wasmi execution. * executor: Remove WasmExecutor and move methods to wasmi_execution. These will now be crate-internal functions and there is no need for the struct. * executor: Set default default_heap_pages in NativeExecutor. * cli: CLI configuration for Wasm execution method. * executor: Remove wasmi-specific code from wasm_runtime. * Respond to review comments.
This commit is contained in:
@@ -380,6 +380,7 @@ impl<'a> ParseAndPrepareImport<'a> {
|
||||
Exit: IntoExit
|
||||
{
|
||||
let mut config = create_config_with_db_path(spec_factory, &self.params.shared_params, self.version)?;
|
||||
config.wasm_method = self.params.wasm_method.into();
|
||||
config.execution_strategies = ExecutionStrategies {
|
||||
importing: self.params.execution.into(),
|
||||
other: self.params.execution.into(),
|
||||
@@ -692,6 +693,8 @@ where
|
||||
service::Roles::FULL
|
||||
};
|
||||
|
||||
config.wasm_method = cli.wasm_method.into();
|
||||
|
||||
let exec = cli.execution_strategies;
|
||||
let exec_all_or = |strat: params::ExecutionStrategy| exec.execution.unwrap_or(strat).into();
|
||||
config.execution_strategies = ExecutionStrategies {
|
||||
|
||||
Reference in New Issue
Block a user