-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make collect-info multi-arch compatible, providing arm64 support
- Loading branch information
1 parent
f246161
commit 8a77cc4
Showing
5 changed files
with
53 additions
and
8 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,27 @@ | ||
## Compile rust binaries for Linux | ||
## Compile rust binaries for Linux amd64 and arm64 | ||
|
||
docker run -v $PWD:/volume -w /volume -t clux/muslrust rustc --target x86_64-unknown-linux-musl *.rs | ||
|
||
On Mac aarch: | ||
|
||
docker run --platform linux/arm64 -v $PWD:/volume -w /volume -t clux/muslrust rustc --target aarch64-unknown-linux-musl *.rs | ||
|
||
cp collect-info collect-info.aarch64-unknown-linux-musl | ||
|
||
docker run --platform linux/amd64 -v $PWD:/volume -w /volume -t clux/muslrust rustc --target x86_64-unknown-linux-musl *.rs | ||
|
||
cp collect-info collect-info.x86_64-unknown-linux-musl | ||
|
||
On Linux: | ||
|
||
docker run --rm --privileged multiarch/qemu-user-static:register | ||
|
||
sudo apt-get install -y qemu binfmt-support qemu-user-static | ||
|
||
docker run --platform linux/arm64 -v /usr/bin/qemu-aarch64-static:/usr/bin/qemu-aarch64-static -v $PWD:/volume -w /volume -t clux/muslrust rustc --target aarch64-unknown-linux-musl *.rs | ||
|
||
cp collect-info collect-info.aarch64-unknown-linux-musl | ||
|
||
docker run --platform linux/amd64 -v $PWD:/volume -w /volume -t clux/muslrust rustc --target x86_64-unknown-linux-musl *.rs | ||
|
||
cp collect-info collect-info.x86_64-unknown-linux-musl |