Skip to content

Commit 8b46d41

Browse files
authored
fix: vendor OpenSSL for aarch64-linux cross-compilation (#4)
1 parent 1d048f7 commit 8b46d41

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ jobs:
6666
- name: Build (cross aarch64)
6767
if: matrix.target == 'aarch64-unknown-linux-gnu'
6868
run: |
69-
cargo build --release --target ${{ matrix.target }} -p enigma-cli
70-
cargo build --release --target ${{ matrix.target }} -p enigma-proxy
69+
cargo build --release --target ${{ matrix.target }} -p enigma-cli --features vendored-openssl
70+
cargo build --release --target ${{ matrix.target }} -p enigma-proxy --features vendored-openssl
7171
env:
7272
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
73+
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
74+
CXX_aarch64_unknown_linux_gnu: aarch64-linux-gnu-g++
7375

7476
- name: Build
7577
if: matrix.target != 'aarch64-unknown-linux-gnu'

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ base64 = "0.22"
124124
# Hex
125125
hex = "0.4"
126126

127+
# OpenSSL (vendored for cross-compilation)
128+
openssl = { version = "0.10", features = ["vendored"] }
129+
127130
# Internal
128131
enigma-core = { path = "crates/enigma-core" }
129132
enigma-storage = { path = "crates/enigma-storage" }

crates/enigma-cli/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ glob = "0.3"
2727
rpassword = "5"
2828
hex.workspace = true
2929

30+
# OpenSSL (vendored for cross-compilation)
31+
openssl = { workspace = true, optional = true }
32+
3033
[features]
3134
default = []
35+
vendored-openssl = ["dep:openssl"]
3236
azure-keyvault = ["enigma-keys/azure-keyvault"]
3337
gcp-secretmanager = ["enigma-keys/gcp-secretmanager"]
3438
aws-secretsmanager = ["enigma-keys/aws-secretsmanager"]

crates/enigma-proxy/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ prometheus = { workspace = true, optional = true }
4444
# Web UI (optional)
4545
enigma-web = { workspace = true, optional = true }
4646

47+
# OpenSSL (vendored for cross-compilation)
48+
openssl = { workspace = true, optional = true }
49+
4750
[features]
4851
default = []
52+
vendored-openssl = ["dep:openssl"]
4953
tls = ["dep:tokio-rustls", "dep:rustls-pemfile", "dep:rustls"]
5054
metrics = ["dep:prometheus"]
5155
web = ["dep:enigma-web"]

0 commit comments

Comments
 (0)