From c4ea3a6f41749cfc8351533f1146610980b4faea Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Tue, 30 May 2017 15:06:46 +0400 Subject: [PATCH] Update README.md --- README.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ae8afb7..67f7136 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,25 @@ -# wasm-tools +# wasm-utils -Boilerplate code to test Parity WASM tools and compile rust/c/c++ code to wasm-contracts +Collection of WASM utilities used in Parity and WASM contract devepment -## How to compile contract +## Symbols optimizer (wasm-opt) ``` -git clone https://github.com/NikVolf/wasm-tools -cd wasm-tools/runner -./build.sh -./start.sh +cargo run --release --bin wasm-opt -- ``` -and then open `http://localhost:8000`, specify input stream in `Input` input, press `Execute call` to run a contract `call` function, see storage update (if contract produced any) as well as `Result` stream (again, if contract produced any). +This will optimize WASM symbols tree to leave only those elements that are used by contract `call` function entry. -see `/samples` directory for sample contracts that are compiled this way +## Gas counter (wasm-gas) -## Prerequisites +For development puposes, raw WASM contract can be injected with gas counters (the same way as it done by Parity runtime when running contracts) -- Emscripiten for C/C++ (see [this page](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html), `emcc` should be in the `PATH`) -- Rust with `wasm32-unknown-emscripten` target (see [this instruction](https://hackernoon.com/compiling-rust-to-webassembly-guide-411066a69fde) to setup) +``` +cargo run --release --bin wasm-gas --