Windows: cargo install fails on openssl-sys (no system OpenSSL) #73

Open
opened 2026-05-23 20:55:30 +00:00 by coilysiren · 0 comments
Owner

Originally filed by @coilysiren on 2026-04-29T01:58:19Z - https://github.com/coilysiren/repo-recall/issues/29

Repro

On a fresh Windows 11 box with Rust toolchain stable-x86_64-pc-windows-msvc and MSVC build tools installed:

```sh
cargo install --git https://github.com/coilysiren/repo-recall --tag v0.13.15 --locked
```

fails compiling `openssl-sys v0.9.114`:

Could not find directory of OpenSSL installation, and this `-sys` crate cannot proceed without this knowledge.

`vcpkg` not present, `OPENSSL_DIR` unset. Windows ships no system OpenSSL.

Workaround

`choco install openssl` (243 MB, needs admin), then `OPENSSL_DIR='C:\Program Files\OpenSSL-Win64'` in front of the cargo install. Works, but a 250 MB system-wide install with a UAC prompt is a real friction tax for what should be a single-binary tool.

Root cause

`web-push 0.10` (the only TLS-touching dep, used for the opt-in PWA push deliveries) defaults to native TLS, which on Windows means linking against a system OpenSSL that doesn't exist by default.

Suggested fix

Switch `web-push` to a rustls-backed configuration so the build is hermetic on all three OSes. Two routes worth exploring:

  1. `web-push` itself has feature flags for the HTTP client backend (`isahc-client` default vs `hyper-client`). The `hyper-client` path can be paired with a rustls connector and skip OpenSSL entirely. Worth checking whether that combo is exposed cleanly through web-push's feature surface or needs a small wrapper.
  2. If web-push's surface doesn't make this clean, consider `web-push-native` or rolling the FCM POST directly with `reqwest` + `rustls-tls` (already implicit elsewhere in the stack).

Either way, the goal is `cargo install --git ... --locked` working cold on Windows with no system deps. Same hermetic build that `rusqlite`'s `bundled` feature already gives us for SQLite.

Adjacent: README install path on Windows

Once cargo install works hermetically, the README's "Install via Homebrew" section is the only documented packaged path. A short Windows section pointing at `cargo install` (and noting `brew services` doesn't translate, NSSM/Task Scheduler are the equivalents) would help. Happy to take that as a follow-up once the rustls swap lands.

_Originally filed by @coilysiren on 2026-04-29T01:58:19Z - [https://github.com/coilysiren/repo-recall/issues/29](https://github.com/coilysiren/repo-recall/issues/29)_ ## Repro On a fresh Windows 11 box with Rust toolchain `stable-x86_64-pc-windows-msvc` and MSVC build tools installed: \`\`\`sh cargo install --git https://github.com/coilysiren/repo-recall --tag v0.13.15 --locked \`\`\` fails compiling \`openssl-sys v0.9.114\`: > Could not find directory of OpenSSL installation, and this \`-sys\` crate cannot proceed without this knowledge. \`vcpkg\` not present, \`OPENSSL_DIR\` unset. Windows ships no system OpenSSL. ## Workaround \`choco install openssl\` (243 MB, needs admin), then \`OPENSSL_DIR='C:\Program Files\OpenSSL-Win64'\` in front of the cargo install. Works, but a 250 MB system-wide install with a UAC prompt is a real friction tax for what should be a single-binary tool. ## Root cause \`web-push 0.10\` (the only TLS-touching dep, used for the opt-in PWA push deliveries) defaults to native TLS, which on Windows means linking against a system OpenSSL that doesn't exist by default. ## Suggested fix Switch \`web-push\` to a rustls-backed configuration so the build is hermetic on all three OSes. Two routes worth exploring: 1. \`web-push\` itself has feature flags for the HTTP client backend (\`isahc-client\` default vs \`hyper-client\`). The \`hyper-client\` path can be paired with a rustls connector and skip OpenSSL entirely. Worth checking whether that combo is exposed cleanly through web-push's feature surface or needs a small wrapper. 2. If web-push's surface doesn't make this clean, consider \`web-push-native\` or rolling the FCM POST directly with \`reqwest\` + \`rustls-tls\` (already implicit elsewhere in the stack). Either way, the goal is \`cargo install --git ... --locked\` working cold on Windows with no system deps. Same hermetic build that \`rusqlite\`'s \`bundled\` feature already gives us for SQLite. ## Adjacent: README install path on Windows Once cargo install works hermetically, the README's "Install via Homebrew" section is the only documented packaged path. A short Windows section pointing at \`cargo install\` (and noting \`brew services\` doesn't translate, NSSM/Task Scheduler are the equivalents) would help. Happy to take that as a follow-up once the rustls swap lands.
coilysiren added
P4
and removed
P3
labels 2026-05-31 07:01:08 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
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
coilyco-flight-deck/repo-recall#73
No description provided.