diff --git a/client/Cargo.toml b/client/Cargo.toml index d711620d8c..17d05d68de 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -24,6 +24,9 @@ serde_json = "1.0.61" sp-keyring = "3.0.0" thiserror = "1.0.23" +[target.'cfg(target_arch="x86_64")'.dependencies] +sc-service = { version = "0.9.0", default-features = false, features = ["wasmtime"] } + [dev-dependencies] async-std = { version = "1.8.0", features = ["attributes"] } env_logger = "0.8.2" diff --git a/client/src/lib.rs b/client/src/lib.rs index 1965e586df..5699ec1842 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -54,6 +54,7 @@ use sc_service::{ NetworkConfiguration, TaskType, TelemetryEndpoints, + WasmExecutionMethod, }, ChainSpec, Configuration, @@ -217,6 +218,8 @@ pub struct SubxtClientConfig { pub role: Role, /// Enable telemetry on the given port. pub telemetry: Option, + /// Wasm execution method + pub wasm_method: WasmExecutionMethod, } impl SubxtClientConfig { @@ -287,7 +290,7 @@ impl SubxtClientConfig { tracing_receiver: Default::default(), tracing_targets: Default::default(), transaction_pool: Default::default(), - wasm_method: Default::default(), + wasm_method: self.wasm_method, base_path: Default::default(), informant_output_format: Default::default(), state_pruning: Default::default(), @@ -362,6 +365,7 @@ mod tests { chain_spec, role: Role::Light, telemetry: None, + wasm_method: Default::default(), }; let client = ClientBuilder::::new() .set_client( @@ -395,6 +399,7 @@ mod tests { chain_spec: test_node::chain_spec::development_config().unwrap(), role: Role::Authority(AccountKeyring::Alice), telemetry: None, + wasm_method: Default::default(), }; let client = ClientBuilder::::new() .set_client( diff --git a/src/lib.rs b/src/lib.rs index a7a5628aa0..4387e52ba8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -657,6 +657,7 @@ mod tests { chain_spec: test_node::chain_spec::development_config().unwrap(), role: Role::Authority(key), telemetry: None, + wasm_method: Default::default(), }; let client = ClientBuilder::new() .set_client(