Skip to content

Commit 4faa1fe

Browse files
committed
Add cross configuration
This allows running unit tests on a non-linux platform via the `cross test` command.
1 parent b53fee6 commit 4faa1fe

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Cross.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Cross doesn't seem to look for package specific configurations when invoked in a workspace so
2+
# we put the default target in Cross.toml
3+
4+
[build]
5+
default-target = "aarch64-unknown-linux-gnu"
6+
7+
# Allow usage of locally built version of the cross docker image that matches the host architecture
8+
# e.g. Building a linux/arm64 image for an AARCH64 host allows native execution of the image.
9+
# Specifying the toolchain for a linux/arm64 image means the correct toolchain is used on that
10+
# platform (it defaults to x86_64).
11+
[target.aarch64-unknown-linux-gnu.image]
12+
name = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
13+
toolchain = ["linux/arm64=aarch64-unknown-linux-gnu"]

0 commit comments

Comments
 (0)