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

build(rust-bindings): use the 2021 rust edition #3386

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

camshaft
Copy link
Contributor

@camshaft camshaft commented Jul 6, 2022

Description of changes:

This change updates the rust bindings to use the 2021 edition of rust. This brings some new features as noted here.

The most applicable change here is the cargo resolver v2 is enabled by default. This fixes a few issues with feature resolution.

Call-outs:

The openssl-sys crate no longer seems to be consistently exporting the DEP_OPENSSL_ROOT variable. This causes some issues for the current cmake logic so I've removed it and only depend on DEP_OPENSSL_INCLUDE, which is still consistent.

Testing:

The current CI checks should be sufficient to catch any issues.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the s2n-core team label Jul 6, 2022
@camshaft camshaft marked this pull request as ready for review July 6, 2022 21:47
@camshaft camshaft enabled auto-merge (squash) July 6, 2022 21:53
@camshaft camshaft requested a review from lrstewart July 6, 2022 21:58
Comment on lines 124 to +125

if features.supports("features") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is ridiculous and I love it.

Comment on lines +191 to +193

// link the built artifact
if lib.join("libs2n.a").exists() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why switch from checking for the .so to the .a? (see old line 186)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized .so is only Linux. On macOS it's going to by .dylib. Whereas if we use .a we don't have to care :)

@camshaft camshaft merged commit c8380d0 into aws:main Jul 6, 2022
@camshaft camshaft deleted the rust-2021 branch July 6, 2022 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants