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

Clean up backend features and vendor curve25519_dalek_derive #531

Merged
merged 53 commits into from Jun 22, 2023

Conversation

pinkforest
Copy link
Contributor

@pinkforest pinkforest commented Jun 13, 2023

Closes #414 (again)
Implements:

  • CPU auto-detection feature / cfg gate #529 consensus to use cfg(curve25519_dalek_backend = "override")
  • Cleans up the unused backend features which we don't want to advertise for now
  • Vendors in unsafe_target_feature in as curve25519-dalek-derive (co-authored by for @koute)
  • cfg(curve25519_dalek_diagnostics="build") now emits compile_error build diagnostics used for build script testing
  • Found a missing zeroize feature gate -fixed
  • build script is now tested with tests/build_tests.sh and added to CI
  • Clean up & simplify the documentation for backend override

Notes

@@ -0,0 +1,2 @@
/target
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need a vendor/ directory?

I'd just put this in a toplevel directory called curve25519-dalek-derive, and perhaps eventually we can move the rest of the files in the toplevel directory into curve25519-dalek

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah sure, it was already there so I thought to follow that. will move. I'll also send the workspace PR move after rc.3

Copy link
Contributor

@rozbb rozbb left a comment

Choose a reason for hiding this comment

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

Thanks so much for doing this. It's a big PR. Left a few comments about clarity here and there.

src/backend/mod.rs Outdated Show resolved Hide resolved
tests/build_tests.sh Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@rozbb
Copy link
Contributor

rozbb commented Jun 15, 2023

Manually verified that curve25519_dalek_derive/ mirrors the unsafe_target_feature repo at 389ae00, modulo renaming and metadata changes.

build.rs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@rozbb
Copy link
Contributor

rozbb commented Jun 20, 2023

Thanks for the updates! Made a pass on the README which hopefully clarifies how backend selection now works. @koute @tarcieri take a look at just the "Backend" section if you get a chance and lmk if it's good to go.

@rozbb rozbb merged commit e429bde into dalek-cryptography:main Jun 22, 2023
19 checks passed
@koute
Copy link
Contributor

koute commented Jun 22, 2023

LGTM!

@pinkforest Thank you for pushing this forward!

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.

Failed backend override - Warning or Error Simplifying backend selection
4 participants