Make sure frame examples compile for wasm (#5332)

* Make sure frame examples compile for wasm

This makes sure that `frame-example` and `frame-example-offchain-worker`
compile for wasm.

This also fixes compilation for these crates. The offchain worker
example doesn't use serde-json anymore as that is too heavy and breaks
`no_std` compilation.

* Apply suggestions from code review

Co-Authored-By: Nikolay Volf <nikvolf@gmail.com>

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
This commit is contained in:
Bastian Köcher
2020-03-20 16:57:39 +01:00
committed by GitHub
parent 57af4facbd
commit 46458f4082
6 changed files with 93 additions and 32 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ sp-std = { version = "2.0.0-alpha.4", default-features = false, path = "../../pr
sp-io = { version = "2.0.0-alpha.4", default-features = false, path = "../../primitives/io" }
[dev-dependencies]
sp-core = { version = "2.0.0-alpha.4", path = "../../primitives/core" }
sp-core = { version = "2.0.0-alpha.4", path = "../../primitives/core", default-features = false }
[features]
default = ["std"]