Skip to content

Commit 7dd1166

Browse files
ctronclaude
andcommitted
feat: remove direct OpenSSL dependency, use OS-native TLS
Remove the explicit openssl crate dependency and actix-web's openssl feature. TLS is now controlled via two mutually exclusive features: - native-tls (default): uses the OS-native TLS stack (OpenSSL on Linux, Secure Transport on macOS, SChannel on Windows) - rustls: pure-Rust TLS, used for musl targets that lack a system TLS This eliminates the vendored feature, the vcpkg/OpenSSL setup in CI for Windows builds, and reduces the dependency tree significantly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 669bd1a commit 7dd1166

4 files changed

Lines changed: 56 additions & 308 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,34 +43,12 @@ jobs:
4343
- os: ubuntu-latest
4444
install: |
4545
sudo apt install -y libssl-dev
46-
- os: windows-latest
47-
install: |
48-
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
49-
vcpkg install openssl:x64-windows-static-md
5046
5147
runs-on: ${{ matrix.os }}
5248

5349
steps:
5450
- uses: actions/checkout@v7
5551

56-
- name: Configure vcpkg binary cache
57-
if: runner.os == 'Windows'
58-
shell: bash
59-
run: |
60-
cache_dir="${{ runner.temp }}/vcpkg-binary-cache"
61-
mkdir -p "$cache_dir"
62-
echo "VCPKG_DEFAULT_BINARY_CACHE=$cache_dir" >> "$GITHUB_ENV"
63-
echo "VCPKG_BINARY_SOURCES=clear;files,$cache_dir,readwrite" >> "$GITHUB_ENV"
64-
65-
- name: Cache vcpkg binaries
66-
uses: actions/cache@v6
67-
if: runner.os == 'Windows'
68-
with:
69-
path: ${{ runner.temp }}/vcpkg-binary-cache
70-
key: ${{ runner.os }}-vcpkg-${{ matrix.rust }}-${{ hashFiles('.github/workflows/ci.yaml') }}
71-
restore-keys: |
72-
${{ runner.os }}-vcpkg-${{ matrix.rust }}-
73-
7452
- uses: Swatinem/rust-cache@v2
7553
with:
7654
shared-key: ${{ matrix.rust }}
@@ -85,6 +63,7 @@ jobs:
8563
rustup toolchain install ${{ matrix.rust }} --component clippy
8664
8765
- name: Install dependencies
66+
if: matrix.install
8867
run: ${{ matrix.install }}
8968

9069
- name: Check

.github/workflows/release.yaml

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -77,28 +77,23 @@ jobs:
7777
7878
- target: aarch64-unknown-linux-musl
7979
os: ubuntu-22.04-arm
80+
args: --no-default-features --features rustls
8081
install: |
8182
sudo apt install -y musl-tools
82-
args: --features vendored
8383
- target: x86_64-unknown-linux-musl
8484
os: ubuntu-22.04
85+
args: --no-default-features --features rustls
8586
install: |
8687
sudo apt install -y musl-tools
87-
args: --features vendored
8888
8989
- target: x86_64-apple-darwin
9090
os: macos-15-intel
91-
args: --features vendored
9291
- target: aarch64-apple-darwin
9392
os: macos-15
94-
args: --features vendored
9593

9694
- target: x86_64-pc-windows-msvc
9795
os: windows-2022
9896
exe: ".exe"
99-
install: |
100-
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
101-
vcpkg install openssl:x64-windows-static-md
10297
- target: aarch64-pc-windows-msvc
10398
os: windows-11-arm
10499
exe: ".exe"
@@ -107,9 +102,6 @@ jobs:
107102
Start-Process -FilePath .\rustup-init.exe -ArgumentList "-y" -NoNewWindow -Wait
108103
echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
109104
110-
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
111-
vcpkg install openssl:arm64-windows-static-md
112-
113105
runs-on: ${{ matrix.os }}
114106

115107
steps:
@@ -118,24 +110,6 @@ jobs:
118110
with:
119111
fetch-depth: 0
120112

121-
- name: Configure vcpkg binary cache
122-
if: runner.os == 'Windows'
123-
shell: bash
124-
run: |
125-
cache_dir="${{ runner.temp }}/vcpkg-binary-cache"
126-
mkdir -p "$cache_dir"
127-
echo "VCPKG_DEFAULT_BINARY_CACHE=$cache_dir" >> "$GITHUB_ENV"
128-
echo "VCPKG_BINARY_SOURCES=clear;files,$cache_dir,readwrite" >> "$GITHUB_ENV"
129-
130-
- name: Cache vcpkg binaries
131-
uses: actions/cache@v6
132-
if: runner.os == 'Windows'
133-
with:
134-
path: ${{ runner.temp }}/vcpkg-binary-cache
135-
key: ${{ runner.os }}-vcpkg-${{ matrix.target }}-${{ hashFiles('.github/workflows/release.yaml') }}
136-
restore-keys: |
137-
${{ runner.os }}-vcpkg-${{ matrix.target }}-
138-
139113
- uses: Swatinem/rust-cache@v2
140114
with:
141115
shared-key: ${{ matrix.target }}

0 commit comments

Comments
 (0)