aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukeflo2025-10-07 08:30:35 +0200
committerlukeflo2025-10-07 08:30:48 +0200
commit34170cfa62df5443a0d8675106c553efec035687 (patch)
treeb7922c3ac98a5b52ff70ecb6f67ea91adf53e992
parentc93372bf76fa05cff2653554c333d4d143555682 (diff)
downloadbibiman-34170cfa62df5443a0d8675106c553efec035687.tar.gz
bibiman-34170cfa62df5443a0d8675106c553efec035687.zip
add Cross.toml for cross compilation
-rw-r--r--.gitignore1
-rw-r--r--Cargo.toml7
-rw-r--r--Cross.toml11
3 files changed, 19 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e711a10..b4447bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
/target
+/binary-files
# no backup files
**/*.bak
diff --git a/Cargo.toml b/Cargo.toml
index 18aa0f1..66627b8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -40,3 +40,10 @@ figment = { version = "0.10.19", features = [ "toml", "test" ]}
owo-colors = "4.2.2"
logos = "0.15.1"
phf = { version = "0.13.1", features = ["macros"] }
+
+[workspace.metadata.cross.target.aarch64-unknown-linux-gnu]
+# Install libssl-dev:arm64, see <https://github.com/cross-rs/cross/blob/main/docs/custom_images.md#adding-dependencies-to-existing-images>
+pre-build = [
+ "dpkg --add-architecture $CROSS_DEB_ARCH",
+ "apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH"
+]
diff --git a/Cross.toml b/Cross.toml
new file mode 100644
index 0000000..e7cd27b
--- /dev/null
+++ b/Cross.toml
@@ -0,0 +1,11 @@
+[target.aarch64-unknown-linux-gnu]
+pre-build = [
+ "dpkg --add-architecture $CROSS_DEB_ARCH",
+ "apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH",
+]
+
+[target.aarch64-unknown-linux-musl]
+pre-build = [
+ "dpkg --add-architecture $CROSS_DEB_ARCH",
+ "apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH",
+]