Skip to content

✨ (VoteSecure P1/2) Build wbraid on stable Rust 1.96.0 - #3115

Open
eselimsen wants to merge 3 commits into
feat/meta-12886-01-import/mainfrom
feat/meta-12886-02-build-stable/main
Open

✨ (VoteSecure P1/2) Build wbraid on stable Rust 1.96.0#3115
eselimsen wants to merge 3 commits into
feat/meta-12886-01-import/mainfrom
feat/meta-12886-02-build-stable/main

Conversation

@eselimsen

@eselimsen eselimsen commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Parent issue: https://github.com/sequentech/meta/issues/12886

Makes the packages/wbraid workspace build with the stable toolchain — cargo build, cargo check/test --all-targets all pass — keeping upstream's nightly behaviour available behind features:

  • vsc: the two nightly gates (stmt_expr_attributes, proc_macro_hygiene) are now enabled only with the custom-warnings feature, and the #[crate::warning] uses in statement, expression and file-module position are wrapped in cfg_attr(feature = "custom-warnings", ...) — stable rejects proc-macro attributes in those positions even though custom_warning_macro is a pass-through with its "on" feature off. Item-position uses compile on stable and are untouched.
  • vsc: the shuffle bench (#![feature(test)], a hard error on stable) is gated behind a new empty nightly-benches feature via required-features, so stable --all-targets builds skip it.
  • Cargo.lock: pinned primefield to 0.14.0-rc.9. Cargo's pre-release semver rules resolve p256 0.14.0-rc.9's "primefield 0.14.0-rc.9" requirement to the API-incompatible 0.14.0 final release, which does not compile against p256 rc.9 — the previously committed lock was broken this way.

cargo clippy --workspace is clean on stable. --all-targets clippy still fails inside vsc's test modules and the shuffle_scaling example (unwrap_used and pedantic lints in test code, identical on nightly); that upstream state is left untouched.

PROVENANCE.md documents the local modifications.

Summary by CodeRabbit

  • Build Improvements

    • Improved compatibility with stable Rust toolchains.
    • Stable all-target builds now exclude nightly-only benchmarks unless explicitly enabled.
    • Warning behavior can be configured for supported build scenarios without changing runtime functionality.
  • Documentation

    • Added guidance for stable builds and nightly benchmark execution.
    • Documented current lint results and remaining upstream warnings.

Makes the packages/wbraid workspace build with the stable toolchain —
cargo build, cargo check/test --all-targets all pass — keeping upstream's
nightly behaviour available behind features:

- vsc: the two nightly gates (stmt_expr_attributes, proc_macro_hygiene)
  are now enabled only with the custom-warnings feature, and the
  #[crate::warning] uses in statement, expression and file-module
  position are wrapped in cfg_attr(feature = "custom-warnings", ...) —
  stable rejects proc-macro attributes in those positions even though
  custom_warning_macro is a pass-through with its "on" feature off.
  Item-position uses compile on stable and are untouched.
- vsc: the shuffle bench (#![feature(test)], a hard error on stable) is
  gated behind a new empty nightly-benches feature via required-features,
  so stable --all-targets builds skip it.
- Cargo.lock: pinned primefield to 0.14.0-rc.9. Cargo's pre-release
  semver rules resolve p256 0.14.0-rc.9's "primefield 0.14.0-rc.9"
  requirement to the API-incompatible 0.14.0 final release, which does
  not compile against p256 rc.9 — the previously committed lock was
  broken this way.

cargo clippy --workspace is clean on stable. --all-targets clippy still
fails inside vsc's test modules and the shuffle_scaling example
(unwrap_used and pedantic lints in test code, identical on nightly);
that upstream state is left untouched.

PROVENANCE.md documents the local modifications.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 1, 2026 10:47
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 6a986107-d05d-4f27-b657-be3943f03c7e

📥 Commits

Reviewing files that changed from the base of the PR and between accdb9b and 499f667.

⛔ Files ignored due to path filters (1)
  • packages/wbraid/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • packages/wbraid/PROVENANCE.md
  • packages/wbraid/crates/vsc/Cargo.toml
  • packages/wbraid/crates/vsc/benches/shuffle.rs
  • packages/wbraid/crates/vsc/src/dkgd/mod.rs
  • packages/wbraid/crates/vsc/src/dkgd/recipient.rs
  • packages/wbraid/crates/vsc/src/groups/p256/group.rs
  • packages/wbraid/crates/vsc/src/groups/ristretto255/group.rs
  • packages/wbraid/crates/vsc/src/lib.rs
  • packages/wbraid/crates/vsc/src/utils/symm.rs
  • packages/wbraid/crates/vsc/src/zkp/shuffle.rs

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

Changes

The vsc crate now gates custom warnings and unstable attributes behind custom-warnings. The shuffle benchmark now requires nightly-benches, and stable-Rust build changes are documented.

Stable Rust compatibility

Layer / File(s) Summary
Conditional custom warnings
packages/wbraid/crates/vsc/src/lib.rs, packages/wbraid/crates/vsc/src/dkgd/*, packages/wbraid/crates/vsc/src/groups/*, packages/wbraid/crates/vsc/src/utils/symm.rs, packages/wbraid/crates/vsc/src/zkp/shuffle.rs
Warning attributes and unstable feature attributes now apply only when custom-warnings is enabled.
Nightly benchmark gating and documentation
packages/wbraid/crates/vsc/Cargo.toml, packages/wbraid/crates/vsc/benches/shuffle.rs, packages/wbraid/PROVENANCE.md
The shuffle benchmark requires nightly-benches. Benchmark commands and stable-Rust modifications are documented.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 499f6

The PR limits nightly-only behavior to the appropriate feature paths while enabling stable builds, with no actionable merge-blocking risk remaining beyond normal checks and review.

Suggested reviewers: xalsina-sequent

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 8 files. (2 skipped: 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: updating the wbraid workspace to build on stable Rust 1.96.0. The emoji and tracking label add minor noise but do not obscure the purpose.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 8 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/meta-12886-02-build-stable/main

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adjusts the packages/wbraid workspace to build successfully on stable Rust 1.96.0 while preserving upstream nightly-only behavior behind opt-in Cargo features. The core approach is to conditionally enable nightly language features only when explicitly requested and to exclude nightly-only benchmarks from stable --all-targets builds.

Changes:

  • Wrapped crates/vsc nightly gates and non-item #[crate::warning(...)] usages behind cfg_attr(feature = "custom-warnings", ...) so stable builds avoid proc-macro attributes in unsupported positions.
  • Added a nightly-benches feature and marked the shuffle bench as required-features = ["nightly-benches"] to keep #![feature(test)] out of stable --all-targets.
  • Updated packages/wbraid/Cargo.lock to pin primefield to 0.14.0-rc.9 to avoid a pre-release resolution mismatch.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/wbraid/PROVENANCE.md Documents the stable-toolchain compatibility changes and rationale.
packages/wbraid/crates/vsc/src/zkp/shuffle.rs Gates statement/expression-position custom warning attributes behind custom-warnings.
packages/wbraid/crates/vsc/src/utils/symm.rs Gates statement-position custom warning attributes behind custom-warnings.
packages/wbraid/crates/vsc/src/lib.rs Makes nightly feature gates conditional on custom-warnings; gates module-level warning attribute.
packages/wbraid/crates/vsc/src/groups/ristretto255/group.rs Gates statement-position custom warning attribute behind custom-warnings.
packages/wbraid/crates/vsc/src/groups/p256/group.rs Gates statement-position custom warning attribute behind custom-warnings.
packages/wbraid/crates/vsc/src/dkgd/recipient.rs Gates statement-position custom warning attributes behind custom-warnings.
packages/wbraid/crates/vsc/src/dkgd/mod.rs Gates module-position custom warning attribute behind custom-warnings.
packages/wbraid/crates/vsc/Cargo.toml Adds nightly-benches and requires it for the shuffle bench target.
packages/wbraid/crates/vsc/benches/shuffle.rs Updates bench run instructions to use --features nightly-benches.
packages/wbraid/Cargo.lock Pins primefield rc version and records an unused patch entry written by Cargo.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

No logic change, only cargo fmt.
Copilot AI review requested due to automatic review settings September 3, 2026 07:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes are narrowly scoped to stable-build compatibility (feature-gating nightly-only code paths and a lockfile fix) without altering runtime logic.

Review details
  • Files reviewed: 57/60 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

The only leftover is vsc errors, which is a vendored fork, so we leave it as is.
Copilot AI review requested due to automatic review settings September 3, 2026 08:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

ProtocolInfo::to_xml currently emits unescaped XML element content, which can produce invalid XML for caller-provided strings (e.g., sid) containing <, > or &.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 68/71 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment on lines +275 to +277
let mut element = |tag: &str, value: &str| {
out.push_str(&format!(" <{tag}>{value}</{tag}>\n"));
};
@eselimsen eselimsen changed the title ✨ Build wbraid on stable Rust 1.96.0 ✨ (VoteSecure P1/1) Build wbraid on stable Rust 1.96.0 Sep 3, 2026
@eselimsen eselimsen changed the title ✨ (VoteSecure P1/1) Build wbraid on stable Rust 1.96.0 ✨ (VoteSecure P1/2) Build wbraid on stable Rust 1.96.0 Sep 3, 2026
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