fix(cryprot-core)!: set is_nightly cfg in build.rs#30
Merged
robinhundt merged 1 commit intomainfrom Jan 21, 2026
Merged
Conversation
Removes the `nightly` feature which was just used for the unstable benchmarking API and instead sets a cfg in a build.rs script. The main benefit is that we can now use --all-features again with a stable compiler.
There was a problem hiding this comment.
Pull request overview
This PR removes the nightly feature flag and replaces it with a is_nightly cfg flag set by a build script. This enables the use of --all-features with stable Rust compilers while still supporting nightly-only benchmarking features.
Changes:
- Replaced
feature = "nightly"cfg checks withis_nightlycfg checks - Added a build.rs script that detects the Rust compiler channel and sets the
is_nightlycfg accordingly - Removed the
nightlyfeature from Cargo.toml
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cryprot-core/src/lib.rs | Updated cfg attribute to use is_nightly instead of feature flag |
| cryprot-core/src/block/gf128.rs | Updated benchmark module cfg attributes to use is_nightly |
| cryprot-core/build.rs | Added new build script to detect nightly compiler and set cfg flag |
| cryprot-core/Cargo.toml | Removed nightly feature and added rustc_version build dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the
nightlyfeature which was just used for the unstable benchmarking API and instead sets a cfg in a build.rs script.The main benefit is that we can now use --all-features again with a stable compiler.