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

ci: restore aws-lc-rs crypto provider, use cargo-c for librustls install #5

Closed
wants to merge 3 commits into from

Conversation

cpu
Copy link
Contributor

@cpu cpu commented Jan 18, 2025

👋 @icing As promised here's a quick follow-up to #4

The aws-lc-rs build issue ended up being specific to the 0.14.1 release. Our old Makefile set CFLAGS globally with fairly aggressive settings for warnings. The intent was to use those settings when building the client.c and server.c examples, but it was inadvertently being used by cargo when building native dependencies of librustls, like aws-lc-sys.

That was causing issues because the aws-lc-sys version in use doesn't build cleanly w/ that level of pedantic warnings and so was breaking the build. That's been tided up upstream by the AWS folks in aws-lc, but for 0.14.1 the easiest thing is to work around this by using make CFLAGS="" ... install in our CI.

I also replaced the cmake usage with direct cargo capi invocation for simplicity/directness.

Thanks again for getting the CI set up! Much appreciated 🙇

cpu added 3 commits January 18, 2025 10:15
The workflow is using the latest cargo-c release, not one tailored to
a Minimum Supported Rust Version (MSRV).
cmake is only required for the client/server example binaries. For
mod_tls we only need the librustls bits and can use cargo-c directly.

cargo-c respects the host OS pattern of putting libs in an
arch-specific subdir. To make the older 0.14.x Makefile install and the
cargo-c install equivalent we override this behaviour by setting
--libdir.
This works without issue with the main branch of rustls-ffi.

For the 0.14.1 release when using the Makefile to install there's an
upstream issue where the CFLAGS intended for the rustls-ffi
client/server examples are _also_ used when building librustls and its
rust dependencies.

This includes aws-lc-sys, which at the version used by
librustls/rustls/aws-lc-rs (0.21.1) produces errors under the pedantic
settings used by rustls-ffi for its examples. The warnings have been
fixed upstream, but not for the version in use by rustls-ffi 0.14.x.

To work around this issue we pass CFLAGS="" when running the make
install for librustls 0.14.1.
@icing
Copy link
Owner

icing commented Jan 20, 2025

Thanks a lot! Great!

@icing
Copy link
Owner

icing commented Jan 20, 2025

Merged via e343725

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

Successfully merging this pull request may close these issues.

2 participants