fix(hero_slides_lib): use reqwest+rustls to unblock musl cross-compile #44

Closed
mik-tf wants to merge 1 commit from development_mik_slides_musl_rustls into development
Owner

Summary

Fixes the x86_64-unknown-linux-musl CI build failure on the v0.1.0-rc1 tag (run #164, 2026-05-04T02:24, status=failure).

Root cause

The build failed in openssl-sys v0.9.114's build.rs:

Could not find directory of OpenSSL installation, and this `-sys` crate cannot proceed without this knowledge.
$HOST = x86_64-unknown-linux-gnu
$TARGET = x86_64-unknown-linux-musl
openssl-sys = 0.9.114

The CI runner has glibc OpenSSL via apt, but the build target is musl, and pkg-config refuses to cross-link glibc libraries into a musl binary.

The dep chain pulling in openssl-sys was:

openssl-sys
  via native-tls
    via hyper-tls
      via reqwest v0.12.28      <-- hero_slides_lib's declaration

Hero's other working repos (hero_proc, hero_rpc, hero_aibroker, etc.) already do this right — default-features = false on reqwest + explicit rustls-tls feature. hero_slides_lib was the outlier.

Fix

crates/hero_slides_lib/Cargo.toml:25 — switch reqwest declaration from defaults (which include default-tlsnative-tlsopenssl-sys) to explicit rustls-tls:

-reqwest = { version = "0.12", features = ["blocking", "multipart"] }
+reqwest = { version = "0.12", default-features = false, features = ["blocking", "multipart", "rustls-tls"] }

cargo update -p reqwest refreshes the lockfile. Net change in Cargo.lock:

Crate Before After
openssl-sys present removed
openssl present removed
native-tls present removed
tokio-native-tls present removed
hyper-tls present removed
rustls present (transitive) present (now first-class)
hyper-rustls, tokio-rustls absent added
Windows targets (foreign) present (vendored) removed

Validation

  • cargo check --workspace passes (host target)
  • grep -c '^name = "openssl-sys"' Cargo.lock = 0 (confirmed openssl chain absent)
  • Musl CI verification — happens automatically when the next v* tag is pushed after merge. Recommend v0.1.0-rc2.

Refs

Test plan

  • Local cargo check --workspace passes
  • Cargo.lock no longer contains openssl-sys, openssl, native-tls
  • rustls chain present in lockfile
  • After merge: tag v0.1.0-rc2, verify CI build succeeds, verify Forgejo Release shows assets
  • Smoke service_slides install --from-ci --version v0.1.0-rc2 on heroci

Signed-off-by: mik-tf

## Summary Fixes the `x86_64-unknown-linux-musl` CI build failure on the `v0.1.0-rc1` tag (run [#164](https://forge.ourworld.tf/lhumina_code/hero_slides/actions/runs/164), 2026-05-04T02:24, status=failure). ## Root cause The build failed in `openssl-sys v0.9.114`'s `build.rs`: ``` Could not find directory of OpenSSL installation, and this `-sys` crate cannot proceed without this knowledge. $HOST = x86_64-unknown-linux-gnu $TARGET = x86_64-unknown-linux-musl openssl-sys = 0.9.114 ``` The CI runner has glibc OpenSSL via apt, but the build target is musl, and pkg-config refuses to cross-link glibc libraries into a musl binary. The dep chain pulling in `openssl-sys` was: ``` openssl-sys via native-tls via hyper-tls via reqwest v0.12.28 <-- hero_slides_lib's declaration ``` Hero's other working repos (hero_proc, hero_rpc, hero_aibroker, etc.) already do this right — `default-features = false` on reqwest + explicit `rustls-tls` feature. hero_slides_lib was the outlier. ## Fix `crates/hero_slides_lib/Cargo.toml:25` — switch reqwest declaration from defaults (which include `default-tls` → `native-tls` → `openssl-sys`) to explicit `rustls-tls`: ```diff -reqwest = { version = "0.12", features = ["blocking", "multipart"] } +reqwest = { version = "0.12", default-features = false, features = ["blocking", "multipart", "rustls-tls"] } ``` `cargo update -p reqwest` refreshes the lockfile. Net change in `Cargo.lock`: | Crate | Before | After | |---|---|---| | `openssl-sys` | present | **removed** | | `openssl` | present | **removed** | | `native-tls` | present | **removed** | | `tokio-native-tls` | present | **removed** | | `hyper-tls` | present | **removed** | | `rustls` | present (transitive) | present (now first-class) | | `hyper-rustls`, `tokio-rustls` | absent | added | | Windows targets (foreign) | present (vendored) | **removed** | ## Validation - ✅ `cargo check --workspace` passes (host target) - ✅ `grep -c '^name = "openssl-sys"' Cargo.lock` = 0 (confirmed openssl chain absent) - ⏳ Musl CI verification — happens automatically when the next `v*` tag is pushed after merge. Recommend `v0.1.0-rc2`. ## Refs - [hero_demo#54](https://forge.ourworld.tf/lhumina_code/hero_demo/issues/54) — `--from-ci` rollout, Phase 2 - [hero_slides#42](https://forge.ourworld.tf/lhumina_code/hero_slides/issues/42) — Phase 2 audit issue (cluster D) - Failed run: https://forge.ourworld.tf/lhumina_code/hero_slides/actions/runs/164 ## Test plan - [x] Local `cargo check --workspace` passes - [x] `Cargo.lock` no longer contains `openssl-sys`, `openssl`, `native-tls` - [x] `rustls` chain present in lockfile - [ ] After merge: tag `v0.1.0-rc2`, verify CI build succeeds, verify Forgejo Release shows assets - [ ] Smoke `service_slides install --from-ci --version v0.1.0-rc2` on heroci Signed-off-by: mik-tf
fix(hero_slides_lib): use reqwest+rustls to unblock musl cross-compile
Some checks failed
Test / test (pull_request) Failing after 1m45s
Test / test (push) Failing after 1m49s
1739c159ab
The CI build for v0.1.0-rc1 (run #164, target x86_64-unknown-linux-musl)
failed at the openssl-sys build script — pkg-config can't cross-link
glibc-built OpenSSL into a musl target binary.

Root cause was hero_slides_lib's reqwest declaration leaving
default-features enabled, which pulls native-tls -> openssl-sys.
Other Hero repos (hero_proc, hero_rpc, etc.) already do this right:
default-features = false + explicit rustls-tls.

Switch hero_slides_lib's reqwest dep to match. cargo update -p reqwest
removes openssl-sys, openssl, and native-tls from Cargo.lock entirely;
adds rustls/hyper-rustls/tokio-rustls. Workspace cargo check passes.

Refs: lhumina_code/hero_demo#54
Refs: #42

Signed-off-by: mik-tf
Author
Owner

Superseded by PR #45 — bundled with fmt + clippy fixes after local workspace-gate validation. Closing to avoid double-PR confusion.

Signed-off-by: mik-tf

Superseded by [PR #45](https://forge.ourworld.tf/lhumina_code/hero_slides/pulls/45) — bundled with fmt + clippy fixes after local workspace-gate validation. Closing to avoid double-PR confusion. Signed-off-by: mik-tf
mik-tf closed this pull request 2026-05-04 15:20:36 +00:00
Some checks failed
Test / test (pull_request) Failing after 1m45s
Test / test (push) Failing after 1m49s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_slides!44
No description provided.