Created
March 14, 2022 03:25
-
-
Save midnightcodr/023977386e74e888e0ed5bc75d9f5faa to your computer and use it in GitHub Desktop.
alternative al2build function using cross
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RUST_TARGET="aarch64-unknown-linux-gnu" | |
RUST_VERSION="latest" | |
PROJECT_NAME=${PWD##*/} | |
zipRustLambda() { | |
cp ./target/${RUST_TARGET}/release/${PROJECT_NAME} ./bootstrap && zip lambda.zip bootstrap && rm bootstrap | |
} | |
al2build() { | |
cross build --release --target ${RUST_TARGET} | |
if [ "$1" = "zip" ]; then | |
zipRustLambda | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on https://youtu.be/EqV5wKD233c