Skip to content

Commit

Permalink
Add Cross-related metadata to Cargo.toml to fix cross build on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
aleasims committed Dec 9, 2024
1 parent 729d87b commit 86af814
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,14 @@ num_cpus = "1.16.0"
oci-spec = "0.7.0"
tempdir = "0.3.7"
thiserror = "1"

# Cross starting from v2 doesn't have OpenSSL
# See: https://github.com/cross-rs/cross/issues/229
# To avoid errors like 'The system library `openssl` required by crate `openssl-sys` was not found.',
# we add this here.
# See https://github.com/cross-rs/cross/blob/main/docs/config_file.md#build.
[package.metadata.cross.build]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get -y install libssl-dev:$CROSS_DEB_ARCH"
]

0 comments on commit 86af814

Please sign in to comment.