From b41c3a2ecfbd0ff591f6f39dd4b63b26cb39a082 Mon Sep 17 00:00:00 2001 From: spinline Date: Fri, 6 Feb 2026 00:03:23 +0300 Subject: [PATCH] fix: Add vendored OpenSSL for cross-compilation - Add openssl dependency with vendored feature - Fixes CI build for mips-unknown-linux-musl target - Statically links OpenSSL instead of requiring system package - Resolves openssl-sys build failures in cross-compile environment --- Cargo.lock | 11 +++++++++++ backend/Cargo.toml | 1 + 2 files changed, 12 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index e16ee34..0a98a84 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -271,6 +271,7 @@ dependencies = [ "dotenvy", "futures", "mime_guess", + "openssl", "quick-xml", "rust-embed", "serde", @@ -2174,6 +2175,15 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +[[package]] +name = "openssl-src" +version = "300.5.5+3.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f1787d533e03597a7934fd0a765f0d28e94ecc5fb7789f8053b1e699a56f709" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.111" @@ -2182,6 +2192,7 @@ checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 3fcb896..768d4b1 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -28,3 +28,4 @@ utoipa = { version = "5.4.0", features = ["axum_extras"] } utoipa-swagger-ui = { version = "9.0.2", features = ["axum"] } web-push = "0.10" base64 = "0.22" +openssl = { version = "0.10", features = ["vendored"] }