mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-29 13:47:25 +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:
@@ -49,7 +49,7 @@
|
||||
//! use substrate_client::{Client, in_mem::Backend, LocalCallExecutor};
|
||||
//! use primitives::Blake2Hasher;
|
||||
//! use sr_primitives::{StorageOverlay, ChildrenStorageOverlay};
|
||||
//! use executor::NativeExecutor;
|
||||
//! use executor::{NativeExecutor, WasmExecutionMethod};
|
||||
//!
|
||||
//! // In this example, we're using the `Block` and `RuntimeApi` types from the
|
||||
//! // `substrate-test-runtime-client` crate. These types are automatically generated when
|
||||
@@ -62,7 +62,7 @@
|
||||
//! backend.clone(),
|
||||
//! LocalCallExecutor::new(
|
||||
//! backend.clone(),
|
||||
//! NativeExecutor::<LocalExecutor>::new(None),
|
||||
//! NativeExecutor::<LocalExecutor>::new(WasmExecutionMethod::Interpreted, None),
|
||||
//! None,
|
||||
//! ),
|
||||
//! // This parameter provides the storage for the chain genesis.
|
||||
|
||||
Reference in New Issue
Block a user