Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyper-rustls fails on windows machines #280

Closed
opensource-inemar-net opened this issue Jul 22, 2024 · 3 comments
Closed

hyper-rustls fails on windows machines #280

opensource-inemar-net opened this issue Jul 22, 2024 · 3 comments

Comments

@opensource-inemar-net
Copy link

compilation of hyper-rustls fails on windows machines due to rustls using now AWS-LC-SYS as a default crypto provider.
AWS-LC-SYS needs additional build dependencies which are normally not present on windows machines

error: failed to run custom build command for aws-lc-sys v0.20.0

Caused by:
process didn't exit successfully: C:\aPerf\dioxus\test1\target\debug\build\aws-lc-sys-04a602ea992483f7\build-script-main (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=AWS_LC_SYS_NO_PREFIX
cargo:rerun-if-env-changed=AWS_LC_SYS_INTERNAL_BINDGEN
cargo:rerun-if-env-changed=AWS_LC_SYS_EXTERNAL_BINDGEN
cargo:rerun-if-env-changed=AWS_LC_SYS_NO_ASM
cargo:rerun-if-env-changed=AWS_LC_SYS_CMAKE_BUILDER
cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC

--- stderr
AWS_LC_SYS_NO_ASM=1
AWS_LC_SYS_CMAKE_BUILDER=1
Missing dependency: cmake
thread 'main' panicked at C:\Users\yyyyyy.cargo\registry\src\index.crates.io-6f17d22bba15001f\aws-lc-sys-0.20.0\builder/main.rs:289:38:
called Result::unwrap() on an Err value: "Required build dependency is missing. Halting build."
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

To reproduce on a windows machine.

cargo init
cargo add hyper-rustls
cargo build

This is discussed at:
aws/aws-lc#1477
and
rustls/rustls#1913

and causes also upstream problems
Azure/azure-sdk-for-rust#1677

Recommendation is to deactivate rustls default feature and make AWS-LC-SYS opt in

@ctz
Copy link
Member

ctz commented Jul 22, 2024

Recommendation is to deactivate rustls default feature and make AWS-LC-SYS opt in

This crate reexports the relevant crate features, so downstream crates can (and should) do precisely this, such that the choice of provider is left to the "topmost" crate which is also responsible for arranging the build environment.

@opensource-inemar-net
Copy link
Author

the problem is that the default setting should be on the safe side and features additive.
The higher up in the stack the more difficult and brittle becomes, because on of the intermediate layer might forget to expose the necessary config options.

But you have more experience therefore it is your decision.

Close it or keep it open as you prefer

@djc djc closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2024
@djc
Copy link
Member

djc commented Jul 22, 2024

Since you already linked to the relevant discussion in rustls, I don't think it makes sense to keep this open as a separate issue since this crate should match rustls' defaults. If you have any new arguments to contribute, please do so in the rustls issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants