File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # This is a script to cross-compile the project for Windows and Linux
4
+ mkdir -p target/cross
5
+
6
+ rustup target add aarch64-unknown-linux-musl
7
+ rustup target add x86_64-unknown-linux-musl
8
+ rustup target add x86_64-pc-windows-gnu
9
+
10
+ function build() {
11
+ export TARGET=$1
12
+ export EXTENSION=$2
13
+ echo " Building for $TARGET "
14
+ cross build --release --target $TARGET
15
+ mv target/$TARGET /release/faucet$EXTENSION target/cross/faucet-$TARGET$EXTENSION
16
+ sha256sum target/cross/faucet-$TARGET$EXTENSION > target/cross/faucet-$TARGET$EXTENSION .sha256
17
+ }
18
+
19
+ # Build for Linux
20
+ build aarch64-unknown-linux-musl
21
+ build x86_64-unknown-linux-musl
22
+
23
+ # Build for Windows
24
+ build x86_64-pc-windows-gnu .exe
You can’t perform that action at this time.
0 commit comments