This commit is contained in:
rustmailer
2025-11-27 02:01:09 +08:00
parent b845eda58a
commit 855c9a1ffc
3 changed files with 21 additions and 10 deletions
+7 -7
View File
@@ -19,8 +19,8 @@ jobs:
include: include:
- target: x86_64-unknown-linux-gnu - target: x86_64-unknown-linux-gnu
os: ubuntu-latest os: ubuntu-latest
# - target: x86_64-unknown-linux-musl - target: x86_64-unknown-linux-musl
# os: ubuntu-latest os: ubuntu-latest
- target: x86_64-apple-darwin - target: x86_64-apple-darwin
os: macos-latest os: macos-latest
- target: x86_64-pc-windows-msvc - target: x86_64-pc-windows-msvc
@@ -56,20 +56,20 @@ jobs:
pnpm install pnpm install
pnpm run build pnpm run build
# - name: Install musl-tools (Linux musl only) - name: Install musl-tools (Linux musl only)
# if: matrix.target == 'x86_64-unknown-linux-musl' if: matrix.target == 'x86_64-unknown-linux-musl'
# run: sudo apt-get update && sudo apt-get install -y musl-tools run: sudo apt-get update && sudo apt-get install -y musl-tools
- name: Build aarch64 Rust backend - name: Build aarch64 Rust backend
if: matrix.target == 'aarch64-unknown-linux-gnu' if: matrix.target == 'aarch64-unknown-linux-gnu'
run: | run: |
cargo install cross --force cargo install cross --force
cross build --release --target=${{ matrix.target }} cross build --release --features vendored-openssl --target=${{ matrix.target }}
- name: Build Rust backend - name: Build Rust backend
if: matrix.target != 'aarch64-unknown-linux-gnu' if: matrix.target != 'aarch64-unknown-linux-gnu'
run: | run: |
cargo build --release --target=${{ matrix.target }} cargo build --release --features vendored-openssl --target=${{ matrix.target }}
- name: Strip binary (Linux and macOS) - name: Strip binary (Linux and macOS)
if: matrix.os != 'windows-latest' && matrix.target != 'aarch64-unknown-linux-gnu' if: matrix.os != 'windows-latest' && matrix.target != 'aarch64-unknown-linux-gnu'
Generated
+11
View File
@@ -456,6 +456,7 @@ dependencies = [
"native_model", "native_model",
"num_cpus", "num_cpus",
"oauth2", "oauth2",
"openssl-sys",
"poem", "poem",
"poem-derive", "poem-derive",
"poem-openapi", "poem-openapi",
@@ -2684,6 +2685,15 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
[[package]]
name = "openssl-src"
version = "300.5.4+3.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a507b3792995dae9b0df8a1c1e3771e8418b7c2d9f0baeba32e6fe8b06c7cb72"
dependencies = [
"cc",
]
[[package]] [[package]]
name = "openssl-sys" name = "openssl-sys"
version = "0.9.111" version = "0.9.111"
@@ -2692,6 +2702,7 @@ checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321"
dependencies = [ dependencies = [
"cc", "cc",
"libc", "libc",
"openssl-src",
"pkg-config", "pkg-config",
"vcpkg", "vcpkg",
] ]
+2 -2
View File
@@ -10,7 +10,7 @@ path = "src/main.rs"
[features] [features]
default = [] default = []
#vendored-openssl = ["openssl-sys"] vendored-openssl = ["openssl-sys"]
[profile.release] [profile.release]
strip = true strip = true
@@ -102,7 +102,7 @@ autoconfig = "0.4.0"
urlencoding = "2.1.3" urlencoding = "2.1.3"
dashmap = "6.1.0" dashmap = "6.1.0"
# Statically links OpenSSL by compiling from source, avoiding system library dependencies # Statically links OpenSSL by compiling from source, avoiding system library dependencies
#openssl-sys = { version = "0.9.111", optional = true, features = ["vendored"] } openssl-sys = { version = "0.9.111", optional = true, features = ["vendored"] }
gethostname = "1.1.0" gethostname = "1.1.0"
tantivy = { version = "0.25.0", features = ["quickwit", "zstd-compression"] } tantivy = { version = "0.25.0", features = ["quickwit", "zstd-compression"] }
itoa = "1.0.15" itoa = "1.0.15"