Created
June 17, 2022 08:31
-
-
Save nickwanhere/2a36b4eb83588783b412af61013dd075 to your computer and use it in GitHub Desktop.
Compile Rust under Mac OS with Open SSL without cross-compile. Use Docker instead.
This file contains hidden or 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
| LAMBDA_ARCH="linux/x86_64" | |
| RUST_TARGET="x86_64-unknown-linux-gnu" | |
| RUST_VERSION="latest" | |
| APP_NAME="app_name" | |
| docker run -it --platform ${LAMBDA_ARCH} --rm --user "$(id -u)":"$(id -g)" -v "${PWD}":/usr/src/myapp -w /usr/src/myapp rust:${RUST_VERSION} cargo build --release --target ${RUST_TARGET} -v | |
| cp -v ./target/${RUST_TARGET}/release/${APP_NAME} ./build/bootstrap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment