2019-08-18 13:58:31 +03:00
|
|
|
|
## Rust – How to run steps
|
2019-08-16 17:24:18 +03:00
|
|
|
|
There's a `run.sh` script in each step, but if you'd like to run it manually, here's the instructions
|
|
|
|
|
```shell
|
2019-08-16 16:49:07 +03:00
|
|
|
|
|
2019-08-16 17:24:18 +03:00
|
|
|
|
# Go into directory of the desired step (step3 used as example)
|
|
|
|
|
cd step3-finished-app
|
2019-08-16 16:49:07 +03:00
|
|
|
|
|
2019-08-16 17:24:18 +03:00
|
|
|
|
# Download SQLite WASM module
|
|
|
|
|
mkdir wasm
|
|
|
|
|
wget https://github.com/fluencelabs/sqlite/releases/download/v0.2.0_w/sqlite3_0.2.0.wasm -O ./wasm/sqlite3_0.2.0.wasm
|
2019-08-16 16:49:07 +03:00
|
|
|
|
|
2019-08-16 17:24:18 +03:00
|
|
|
|
# Build fluid WASM module
|
|
|
|
|
cargo +nightly build --target wasm32-unknown-unknown --release
|
|
|
|
|
cp target/wasm32-unknown-unknown/release/*.wasm ./wasm/
|
2019-08-16 16:49:07 +03:00
|
|
|
|
|
2019-08-16 17:24:18 +03:00
|
|
|
|
# Run it all on 30000 port with default Fluence API
|
|
|
|
|
docker run -it --rm -v $(pwd)/wasm:/code -p 30000:30000 fluencelabs/frun:latest
|
|
|
|
|
```
|
2019-08-16 16:49:07 +03:00
|
|
|
|
|
2019-08-16 17:24:18 +03:00
|
|
|
|
Also take a look at how to use frun [here](https://fluence.dev/docs/debugging) and look up HTTP API [here](https://fluence.dev/reference)
|