github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/bin/build_rust (about) 1 #!/bin/bash 2 # 3 # Copyright 2017 Intel Corporation 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 # ------------------------------------------------------------------------------ 17 18 set -e 19 20 top_dir=$(cd $(dirname $(dirname $0)) && pwd) 21 22 echo -e "\033[0;32m--- Building Rust SDK ---\n\033[0m" 23 cd $top_dir/sdk/rust/ 24 cargo build 25 26 echo -e "\033[0;32m--- Building sawadm ---\n\033[0m" 27 cd $top_dir/adm 28 mkdir -p $top_dir/adm/bin 29 cargo build --release && cp ./target/release/sawadm $top_dir/adm/bin/sawadm 30 31 echo -e "\033[0;32m--- Building smallbank_workload ---\n\033[0m" 32 cd $top_dir/perf/smallbank_workload 33 mkdir -p $top_dir/perf/smallbank_workload/bin 34 cargo build --release && cp ./target/release/smallbank-workload $top_dir/perf/smallbank_workload/bin/smallbank-workload 35 36 echo -e "\033[0;32m--- Building intkey_workload ---\n\033[0m" 37 cd $top_dir/perf/intkey_workload 38 mkdir -p $top_dir/perf/intkey_workload/bin 39 cargo build --release && cp ./target/release/intkey-workload $top_dir/perf/intkey_workload/bin/intkey-workload 40 41 echo -e "\033[0;32m--- Building intkey-tp-rust ---\n\033[0m" 42 rm -rf $top_dir/sdk/examples/intkey_rust/bin/ 43 mkdir -p $top_dir/sdk/examples/intkey_rust/bin/ 44 cd $top_dir/sdk/examples/intkey_rust 45 cargo build --release && cp ./target/release/intkey_rust $top_dir/sdk/examples/intkey_rust/bin/intkey_rust 46 47 echo -e "\033[0;32m--- Building smallbank-tp-rust ---\n\033[0m" 48 rm -rf $top_dir/families/smallbank/smallbank_rust/bin/ 49 mkdir -p $top_dir/families/smallbank/smallbank_rust/bin/ 50 cd $top_dir/families/smallbank/smallbank_rust 51 cargo build --release && cp ./target/release/smallbank_rust $top_dir/families/smallbank/smallbank_rust/bin/smallbank_rust 52 53 echo -e "\033[0;32m--- Building devmode-rust ---\n\033[0m" 54 rm -rf $top_dir/sdk/examples/devmode_rust/bin/ 55 mkdir -p $top_dir/sdk/examples/devmode_rust/bin/ 56 cd $top_dir/sdk/examples/devmode_rust 57 cargo build --release && cp ./target/release/devmode-rust $top_dir/sdk/examples/devmode_rust/bin/devmode-rust 58 59 echo -e "\033[0;32m--- Building xo-tp-rust ---\n\033[0m" 60 rm -rf $top_dir/sdk/examples/xo_rust/bin/ 61 mkdir -p $top_dir/sdk/examples/xo_rust/bin/ 62 cd $top_dir/sdk/examples/xo_rust 63 cargo build --release && cp ./target/release/xo_rust $top_dir/sdk/examples/xo_rust/bin/xo_rust 64 65 # echo -e "\033[0;32m--- Building noop-tp-rust ---\n\033[0m"