Skip to content

Instantly share code, notes, and snippets.

@goldstar611
Last active November 13, 2022 04:15
Show Gist options
  • Save goldstar611/7e2e21db61b28ec8b0f0daea89e0fd0b to your computer and use it in GitHub Desktop.
Save goldstar611/7e2e21db61b28ec8b0f0daea89e0fd0b to your computer and use it in GitHub Desktop.
arm64 (aarch64) vaultwarden cross compile
# aarch64 and arm64 are basically the same thing
sudo dpkg --add-architecture arm64
sudo apt install -y gcc-aarch64-linux-gnu libpq-dev:arm64 libmariadb-dev:arm64 libmariadbclient-dev-compat:arm64 libgnutls28-dev:arm64 liblz-dev:arm64 libssl-dev:arm64
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add aarch64-unknown-linux-gnu
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/
export PKG_CONFIG_SYSROOT_DIR=/usr/lib/aarch64-linux-gnu
cargo build --target=aarch64-unknown-linux-gnu --features sqlite,mysql,postgresql --release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment