From 62d30f82b4a449a8c8f8904f100c91cabb7e884c Mon Sep 17 00:00:00 2001 From: folex <0xdxdy@gmail.com> Date: Mon, 19 Aug 2019 13:44:03 +0300 Subject: [PATCH] Fix rust run_daemon.sh --- backend-rust/step3-finished-app/run_daemon.sh | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/backend-rust/step3-finished-app/run_daemon.sh b/backend-rust/step3-finished-app/run_daemon.sh index 6f25558..22381a6 100755 --- a/backend-rust/step3-finished-app/run_daemon.sh +++ b/backend-rust/step3-finished-app/run_daemon.sh @@ -3,14 +3,6 @@ set -e set -o pipefail -command -v jq >/dev/null 2>&1 || { - echo >&2 "jq is not installed, wouldn't parse responses" -} - -command -v base64 >/dev/null 2>&1 || { - echo >&2 "base64 is not installed, wouldn't parse responses" -} - mkdir -p wasm # Download SQLite @@ -22,9 +14,8 @@ fi # Build fluid WASM module echo "Building to WASM..." -npm --silent install -npm --quiet run flbuild -cp build/fluid.wasm ./wasm/ +cargo +nightly build --target wasm32-unknown-unknown --release >/dev/null +cp target/wasm32-unknown-unknown/release/*.wasm ./wasm/ echo # Run it all on 30000 port with default Fluence API @@ -78,4 +69,4 @@ RESPONSE=$(echo "$RESPONSE" | jq -r .result.data | base64 --decode 2>/dev/null | # Parse json or print response as is echo "$RESPONSE" | jq . 2>/dev/null || echo "$RESPONSE" -echo -e "You can now proceed with frontend..." \ No newline at end of file +echo -e "You can now proceed with frontend..."