aws / aws-lc-rs

aws-lc-rs is a cryptographic library using AWS-LC for its cryptographic operations. The library strives to be API-compatible with the popular Rust library named ring.
Other
236 stars 40 forks source link

Link to guide on bindgen requirement #366

Closed camshaft closed 2 months ago

camshaft commented 4 months ago

Problem:

Related: https://github.com/aws/s2n-quic/issues/2149

When compiling for a target outside of the pregenerated bindings, the current build fails with a suggestion to enable the bindgen feature in aws-lc-sys. For someone pulling in s2n-quic, this is quite confusing, since they're not depending on it directly.

I think one way to improve this is to link the guide on how to proceed. Maybe we also need to expand the guide a bit and have a specific section about what to do with the dependency of a dependency situation.

Another slight improvement over taking aws-lc as a dependency would be to have them install the bindgen CLI in their PATH and we could try and detect that and use it instead of the crates.io dependency.

justsmth commented 4 months ago

We should link the error message to our User Guide, although its platform support section desperately needs updating. For one, we support many more platforms via bindgen than is indicated there.

Another slight improvement over taking aws-lc as a dependency would be to have them install the bindgen CLI in their PATH and we could try and detect that and use it instead of the crates.io dependency.

That's an interesting idea -- the advantage being that it avoids requiring intermediate packages in the dependency chain needing to specify our "bindgen" feature. We can instruct the consumers facing this issue to install bindgen via cargo install bindgen-cli.

justsmth commented 3 months ago

This PR links the bindgen error to the User Guide: #369