Skip to content

Instantly share code, notes, and snippets.

@midnightcodr
Created March 14, 2022 03:25
Show Gist options
  • Save midnightcodr/023977386e74e888e0ed5bc75d9f5faa to your computer and use it in GitHub Desktop.
Save midnightcodr/023977386e74e888e0ed5bc75d9f5faa to your computer and use it in GitHub Desktop.
alternative al2build function using cross
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
}
@midnightcodr
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment