Compile polkadot-runtime both for Wasm ad native, allowing for testing and direct usage.

This commit is contained in:
Gav
2018-01-09 13:47:28 +01:00
parent 5ab59bb171
commit b104f5e6e4
68 changed files with 98 additions and 23 deletions
+12
View File
@@ -0,0 +1,12 @@
[package]
name = "native-runtime"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
[features]
default = ["with-std"]
with-std = []
without-std = []
[dependencies]
runtime-support = { path = "./support", version = "0.1" }
+1
View File
@@ -0,0 +1 @@
../wasm-runtime/polkadot/src
@@ -0,0 +1,7 @@
[package]
name = "runtime-support"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
[features]
strict = []
@@ -0,0 +1,10 @@
pub use std::vec::Vec;
pub fn storage(_key: &[u8]) -> Vec<u8> { vec![] }
pub fn storage_into<T: Sized>(_key: &[u8]) -> Option<T> { None }
pub fn set_storage(_key: &[u8], _value: &[u8]) {}
#[macro_export]
macro_rules! impl_stubs {
($( $name:ident ),*) => {}
}