Adjust the RPC service for the WASM-browser use case (#3013)

* Use SpawnTaskHandle to pass to the RPC

* Create the RPC server in lib.rs

* Create the RPC servers in a separate function

* Keep a local version of the RPC handlers

* Make rpc-servers compile for WASM

* Add RpcSesssion

* Clean up

* Address review

* Address pull request review
This commit is contained in:
Pierre Krieger
2019-07-05 09:55:50 +02:00
committed by Gavin Wood
parent 13164304b3
commit 8bca52128f
5 changed files with 199 additions and 160 deletions
+2
View File
@@ -188,6 +188,8 @@ check-web-wasm:
- time cargo web build -p substrate-panic-handler
- time cargo web build -p substrate-peerset
- time cargo web build -p substrate-primitives
# TODO: we can't use cargo web until https://github.com/paritytech/jsonrpc/pull/436 is deployed
- time cargo build -p substrate-rpc-servers --target wasm32-unknown-unknown
- time cargo web build -p substrate-serializer
- time cargo web build -p substrate-state-db
- time cargo web build -p substrate-state-machine