Provide macro for exporting functions from wasm (#3801)

The macro generates the functions with the signature we expect for wasm
functions. This macro is useful for tests where we need to call into
wasm. Parameter passing is done by SCALE encoding the input and output
parameters.
This commit is contained in:
Bastian Köcher
2019-10-14 20:20:07 +02:00
committed by GitHub
parent b989c6f9ba
commit e3ae647c42
5 changed files with 312 additions and 144 deletions
+4
View File
@@ -39,6 +39,7 @@ use std::borrow::Cow;
use serde::{Serialize, Deserialize};
#[cfg(feature = "std")]
pub use serde;// << for macro
#[doc(hidden)]
pub use codec::{Encode, Decode};// << for macro
#[cfg(feature = "std")]
@@ -82,6 +83,9 @@ pub use self::hasher::blake2::Blake2Hasher;
pub use primitives_storage as storage;
#[doc(hidden)]
pub use rstd;
/// Context for executing a call into the runtime.
pub enum ExecutionContext {
/// Context for general importing (including own blocks).