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

Support for building aws-lc-rs with just rustc #152

Closed
rcoh opened this issue Jun 13, 2023 · 5 comments
Closed

Support for building aws-lc-rs with just rustc #152

rcoh opened this issue Jun 13, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@rcoh
Copy link
Member

rcoh commented Jun 13, 2023

Problem:

We'd love to include aws-lc-rs in the Rust SDK but feel that the current build requirements are too onerous for most customers to use it as the default.

Consider using build.rs to replace CMake to compile aws-lc-rs. Perhaps we could also use the Rust compiler to achieve the static linking achieved with the Go compiler currently?

@justsmth justsmth added the enhancement New feature or request label Jun 15, 2023
@skmcgrail
Copy link
Member

skmcgrail commented Jun 21, 2023

This is potentially doable for the (non-fips) build of aws-lc, as that build doesn't require the use of the Go compiler.

The challenge here would be specific to the static FIPS build, which is what requires the Go compiler. In particular the Go compiler is used to remove relocation entries from the FIPS module boundary of the resulting assembly code. This is done specifically by delocate, and more information can be found here.

@camshaft
Copy link
Collaborator

I think it's reasonable to focus on the non-fips build as an initial pass. For s2n-tls-sys we did something similar with the post-quantum build. It's a lot more complicated than the regular build so if you enable that, then cmake is required: https://github.com/aws/s2n-tls/blob/21d3510d45e231ae15507959664b4975e47e3057/bindings/rust/s2n-tls-sys/templates/Cargo.template#L28

@pronebird
Copy link

pronebird commented Apr 3, 2024

I concur. I've inherited aws-lc-rs through rustls, now I have to walk around 3 platforms we have and tell everyone how to install CMake which is sub-optimal and would rather avoid.

@justsmth
Copy link
Contributor

justsmth commented Apr 3, 2024

I concur. I've inherited aws-lc-rs through rustls, now I have to walk around 3 platforms we have and tell everyone how to install CMake which is sub-optimal and would rather avoid.

My highest priority right now is eliminating the need for CMake when building for our primary platforms (Linux/MacOS on x86-64/aarch64). Progress is being made. You can watch this PR for the latest updates.

@justsmth
Copy link
Contributor

As of release v1.7.0, CMake is no longer required to build aws-lc-rs for Linux/MacOS on x86-64/aarch64. For these platforms, only the minimal Rust & C toolchains should be required for the build to succeed.

I'm going to close this issue now. Feel free to open another issue to request extending support for our no-cmake build to other platforms (e.g., Windows).

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

No branches or pull requests

5 participants