Move scripts to scripts folder and update readme (#2331)

* Move scripts to scripts folder and update readme

* Update node-template/README.md

Co-Authored-By: xlc <xlchen1291@gmail.com>

* Update node-template/README.md

Co-Authored-By: xlc <xlchen1291@gmail.com>

* Update node-template/README.md

Co-Authored-By: xlc <xlchen1291@gmail.com>

* Update node-template/README.md

Co-Authored-By: xlc <xlchen1291@gmail.com>

* Update node-template/README.md

Co-Authored-By: xlc <xlchen1291@gmail.com>

* Update node-template/README.md

Co-Authored-By: xlc <xlchen1291@gmail.com>

* remove release flag
This commit is contained in:
Xiliang Chen
2019-04-23 18:50:31 +12:00
committed by Bastian Köcher
parent 61d38cce5c
commit c4cbfb355c
3 changed files with 65 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -e
PROJECT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
export CARGO_INCREMENTAL=0
bold=$(tput bold)
normal=$(tput sgr0)
# Save current directory.
pushd . >/dev/null
for SRC in runtime/wasm
do
echo "${bold}Building webassembly binary in $SRC...${normal}"
cd "$PROJECT_ROOT/$SRC"
./build.sh
cd - >> /dev/null
done
# Restore initial directory.
popd >/dev/null
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e
echo "*** Initializing WASM build environment"
if [ -z $CI_PROJECT_NAME ] ; then
rustup update nightly
rustup update stable
fi
rustup target add wasm32-unknown-unknown --toolchain nightly
# Install wasm-gc. It's useful for stripping slimming down wasm binaries.
command -v wasm-gc || \
cargo +nightly install --git https://github.com/alexcrichton/wasm-gc --force