Skip to content

fix(cryprot-core)!: set is_nightly cfg in build.rs#30

Merged
robinhundt merged 1 commit intomainfrom
nightly-cfg
Jan 21, 2026
Merged

fix(cryprot-core)!: set is_nightly cfg in build.rs#30
robinhundt merged 1 commit intomainfrom
nightly-cfg

Conversation

@robinhundt
Copy link
Owner

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.

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.
@robinhundt robinhundt requested a review from Copilot January 21, 2026 15:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 with is_nightly cfg checks
  • Added a build.rs script that detects the Rust compiler channel and sets the is_nightly cfg accordingly
  • Removed the nightly feature 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.

@robinhundt robinhundt enabled auto-merge January 21, 2026 15:06
@robinhundt robinhundt merged commit de6ad0b into main Jan 21, 2026
6 checks passed
@robinhundt robinhundt deleted the nightly-cfg branch January 21, 2026 15:12
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.

2 participants