wasm-utils/README.md

22 lines
907 B
Markdown
Raw Normal View History

2017-04-12 20:52:01 +04:00
# wasm-tools
2017-04-12 20:52:39 +04:00
Boilerplate code to test Parity WASM tools and compile rust/c/c++ code to wasm-contracts
2017-04-12 20:52:01 +04:00
## How to compile contract
```
git clone https://github.com/NikVolf/wasm-tools
cd wasm-tools/runner
./build.sh <PATH TO C/C++/Rust source file>
./start.sh
```
2017-05-04 13:21:13 +04:00
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).
2017-04-12 20:52:01 +04:00
2017-04-12 20:53:31 +04:00
see `/samples` directory for sample contracts that are compiled this way
2017-04-12 20:52:01 +04:00
## Prerequisites
2017-04-12 20:55:47 +04:00
- 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)