Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a6b9624
Statically register host WASM functions
koute Nov 30, 2021
1d8649f
Fix `substrate-test-client` compilation
koute Nov 30, 2021
2a4658f
Move `ExtendedHostFunctions` to `sp-wasm-interface`
koute Dec 2, 2021
878d512
Fix `sp-runtime-interface` tests' compilation
koute Dec 2, 2021
7efc4f5
Fix `sc-executor-wasmtime` tests' compilation
koute Dec 2, 2021
570788d
Use `runtime_interface` macro in `test-runner`
koute Dec 2, 2021
7610cde
Fix `sc-executor` tests' compilation
koute Dec 6, 2021
0c51a64
Reformatting/`rustfmt`
koute Dec 6, 2021
963f9e7
Add an extra comment regarding the `H` generic arg in `create_runtime`
koute Dec 6, 2021
76e8c96
Even more `rustfmt`
koute Dec 6, 2021
e853225
Depend on `wasmtime` without default features in `sp-wasm-interface`
koute Dec 6, 2021
df38788
Merge branch 'master' into master_statically_register_wasmtime_ffi
koute Dec 6, 2021
3699f6d
Merge branch 'master' into master_statically_register_wasmtime_ffi
koute Dec 9, 2021
cd14ed1
Merge branch 'master' into master_statically_register_wasmtime_ffi
koute Dec 10, 2021
f825113
Bump version of `sp-wasm-interface` to 4.0.1
koute Dec 10, 2021
8ffb42d
Bump `sp-wasm-interface` in `Cargo.lock` too
koute Dec 10, 2021
0f7ccf8
Bump all of the `sp-wasm-interface` requirements to 4.0.1
koute Dec 10, 2021
e429bb9
Revert "Bump all of the `sp-wasm-interface` requirements to 4.0.1"
koute Dec 10, 2021
9ce2fb7
Make `cargo-unleash` happy (maybe)
koute Dec 10, 2021
f9019cd
Use `cargo-unleash` to bump the crates' versions
koute Dec 13, 2021
acc2835
Merge branch 'master' into master_statically_register_wasmtime_ffi
koute Dec 13, 2021
61ce0b2
Align to review comments
koute Dec 13, 2021
bdd38da
Merge branch 'master' into master_statically_register_wasmtime_ffi
koute Dec 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix sp-runtime-interface tests' compilation
  • Loading branch information
koute committed Dec 2, 2021
commit 878d512f3167c277e6b200c29fd966cf469ea1b6
17 changes: 6 additions & 11 deletions primitives/runtime-interface/test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use sp_runtime_interface_test_wasm::{test_api::HostFunctions, wasm_binary_unwrap
use sp_runtime_interface_test_wasm_deprecated::wasm_binary_unwrap as wasm_binary_deprecated_unwrap;

use sc_executor_common::runtime_blob::RuntimeBlob;
use sp_wasm_interface::HostFunctions as HostFunctionsT;
use sp_wasm_interface::{ExtendedHostFunctions, HostFunctions as HostFunctionsT};

use std::{
collections::HashSet,
Expand All @@ -39,16 +39,11 @@ fn call_wasm_method_with_result<HF: HostFunctionsT>(
) -> Result<TestExternalities, String> {
let mut ext = TestExternalities::default();
let mut ext_ext = ext.ext();
let mut host_functions = HF::host_functions();
host_functions.extend(sp_io::SubstrateHostFunctions::host_functions());

let executor = sc_executor::WasmExecutor::new(
sc_executor::WasmExecutionMethod::Interpreted,
Some(8),
host_functions,
8,
None,
);

let executor = sc_executor::WasmExecutor::<
ExtendedHostFunctions<sp_io::SubstrateHostFunctions, HF>,
>::new(sc_executor::WasmExecutionMethod::Interpreted, Some(8), 8, None);

executor
.uncached_call(
RuntimeBlob::uncompress_if_needed(binary).expect("Failed to parse binary"),
Expand Down