forked from nushell/nushell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cross-compiling Nu can be a little tricky due to dependencies. This PR makes it easy to use [`cross-rs`](https://github.com/cross-rs/cross), a popular tool for cross-compiling Rust code using Docker: ```bash cross build --target aarch64-unknown-linux-musl --release ``` I find this useful for compiling ARM binaries from x64. Easy to add more target triples later as needed.
- Loading branch information
Showing
3 changed files
with
19 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Configuration for cross-rs: https://github.com/cross-rs/cross | ||
# Run cross-rs like this: | ||
# cross build --target aarch64-unknown-linux-musl --release | ||
|
||
[target.aarch64-unknown-linux-gnu] | ||
dockerfile = "./docker/cross-rs/aarch64-unknown-linux-gnu.dockerfile" | ||
|
||
[target.aarch64-unknown-linux-musl] | ||
dockerfile = "./docker/cross-rs/aarch64-unknown-linux-musl.dockerfile" |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:latest | ||
|
||
RUN dpkg --add-architecture arm64 && \ | ||
apt-get update && \ | ||
apt-get install --assume-yes libssl-dev:arm64 clang |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM ghcr.io/cross-rs/aarch64-unknown-linux-musl:latest | ||
|
||
RUN dpkg --add-architecture arm64 && \ | ||
apt-get update && \ | ||
apt-get install --assume-yes libssl-dev:arm64 clang |