From 3d76df7c24d5b5dab34d45fdce43e219c4704714 Mon Sep 17 00:00:00 2001 From: Michael Rosenberg Date: Fri, 5 Dec 2025 00:06:40 +0100 Subject: [PATCH] Fix docs build and prep prerelease (#855) * Fix failing docs build * Remove hiding of docsrs cfg gate in crates where it doesn't appear * Add docsrs build regression check to CI --- .github/workflows/workspace.yml | 10 ++++++++++ curve25519-dalek/CHANGELOG.md | 4 ++-- curve25519-dalek/Cargo.toml | 10 ++-------- curve25519-dalek/README.md | 2 +- curve25519-dalek/src/lib.rs | 6 +++--- curve25519-dalek/src/lizard.rs | 4 +--- ed25519-dalek/CHANGELOG.md | 2 +- ed25519-dalek/Cargo.toml | 10 +++++----- ed25519-dalek/README.md | 2 +- ed25519-dalek/src/lib.rs | 3 +-- x25519-dalek/CHANGELOG.md | 2 +- x25519-dalek/Cargo.toml | 6 +++--- x25519-dalek/README.md | 2 +- x25519-dalek/src/lib.rs | 3 +-- 14 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index cf5c47e..8a1cf5c 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -110,6 +110,16 @@ jobs: toolchain: stable - run: cargo doc --all-features + docsrs: + name: Check docs-rs build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@nightly + - run: cargo doc --all-features --no-deps + env: + RUSTDOCFLAGS: '--cfg docsrs' + typos: name: Check for typos runs-on: ubuntu-latest diff --git a/curve25519-dalek/CHANGELOG.md b/curve25519-dalek/CHANGELOG.md index 00dd985..dd60d78 100644 --- a/curve25519-dalek/CHANGELOG.md +++ b/curve25519-dalek/CHANGELOG.md @@ -5,9 +5,9 @@ major series. ## 5.x series -## 5.0.0-pre.2 +## 5.0.0-pre.3 -* Add Lizard bytes-to-point injection for Ristretto. Gated under `lizard`. +* Add Lizard bytes-to-point injection for Ristretto. Gated under `lizard` feature. * Upgrade `rand_core` to v0.10.0-rc-2 ## 5.0.0-pre.1 diff --git a/curve25519-dalek/Cargo.toml b/curve25519-dalek/Cargo.toml index 2cced99..b5a3b8b 100644 --- a/curve25519-dalek/Cargo.toml +++ b/curve25519-dalek/Cargo.toml @@ -4,7 +4,7 @@ name = "curve25519-dalek" # - update CHANGELOG # - update README if required by semver # - if README was updated, also update module documentation in src/lib.rs -version = "5.0.0-pre.2" +version = "5.0.0-pre.3" edition = "2024" rust-version = "1.85.0" authors = [ @@ -28,13 +28,7 @@ rustdoc-args = [ "--cfg", "docsrs", ] -features = [ - "serde", - "rand_core", - "digest", - "legacy_compatibility", - "group-bits", -] +all-features = true [dev-dependencies] sha2 = { version = "0.11.0-rc.3", default-features = false } diff --git a/curve25519-dalek/README.md b/curve25519-dalek/README.md index 09b5807..cefa433 100644 --- a/curve25519-dalek/README.md +++ b/curve25519-dalek/README.md @@ -35,7 +35,7 @@ cofactor-related abstraction mismatches. To import `curve25519-dalek`, add the following to the dependencies section of your project's `Cargo.toml`: ```toml -curve25519-dalek = "5.0.0-pre.1" +curve25519-dalek = "5.0.0-pre.3" ``` If opting into [SemVer-exempted features](#public-api-semver-exemptions) a range diff --git a/curve25519-dalek/src/lib.rs b/curve25519-dalek/src/lib.rs index dafd617..8a085df 100644 --- a/curve25519-dalek/src/lib.rs +++ b/curve25519-dalek/src/lib.rs @@ -10,8 +10,8 @@ // - Henry de Valence #![no_std] -#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg, doc_cfg_hide))] -#![cfg_attr(docsrs, doc(cfg_hide(docsrs)))] +#![cfg_attr(docsrs, feature(doc_cfg))] +#![cfg_attr(docsrs, doc(auto_cfg(hide(docsrs))))] //------------------------------------------------------------------------ // Documentation: //------------------------------------------------------------------------ @@ -92,7 +92,7 @@ pub(crate) mod backend; pub(crate) mod window; #[cfg(feature = "lizard")] -pub mod lizard; +mod lizard; pub use crate::{ edwards::EdwardsPoint, montgomery::MontgomeryPoint, ristretto::RistrettoPoint, scalar::Scalar, diff --git a/curve25519-dalek/src/lizard.rs b/curve25519-dalek/src/lizard.rs index 45b4aee..20b4050 100644 --- a/curve25519-dalek/src/lizard.rs +++ b/curve25519-dalek/src/lizard.rs @@ -1,7 +1,5 @@ //! The Lizard method for encoding/decoding 16 bytes into Ristretto points. -#![allow(non_snake_case)] - #[cfg(curve25519_dalek_bits = "32")] mod u32_constants; @@ -10,4 +8,4 @@ mod u64_constants; mod jacobi_quartic; mod lizard_constants; -pub mod lizard_ristretto; +mod lizard_ristretto; diff --git a/ed25519-dalek/CHANGELOG.md b/ed25519-dalek/CHANGELOG.md index 2404f12..aade5fe 100644 --- a/ed25519-dalek/CHANGELOG.md +++ b/ed25519-dalek/CHANGELOG.md @@ -8,7 +8,7 @@ Entries are listed in reverse chronological order per undeprecated major series. # 3.x series -## 3.0.0-pre.2 +## 3.0.0-pre.3 * Upgrade `rand_core` to v0.10.0-rc-2 diff --git a/ed25519-dalek/Cargo.toml b/ed25519-dalek/Cargo.toml index bb0efcc..431cccf 100644 --- a/ed25519-dalek/Cargo.toml +++ b/ed25519-dalek/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ed25519-dalek" -version = "3.0.0-pre.2" +version = "3.0.0-pre.3" edition = "2024" authors = [ "isis lovecruft ", @@ -25,10 +25,10 @@ rustdoc-args = [ "--cfg", "docsrs", ] -features = ["batch", "digest", "hazmat", "pem", "serde"] +all-features = true [dependencies] -curve25519-dalek = { version = "=5.0.0-pre.2", default-features = false, features = [ +curve25519-dalek = { version = "=5.0.0-pre.3", default-features = false, features = [ "digest", ] } ed25519 = { version = "3.0.0-rc.2", default-features = false } @@ -43,11 +43,11 @@ serde = { version = "1.0", default-features = false, optional = true } zeroize = { version = "1.5", default-features = false, optional = true } [dev-dependencies] -curve25519-dalek = { version = "=5.0.0-pre.2", default-features = false, features = [ +curve25519-dalek = { version = "=5.0.0-pre.3", default-features = false, features = [ "digest", "rand_core", ] } -x25519-dalek = { version = "=3.0.0-pre.2", default-features = false, features = [ +x25519-dalek = { version = "=3.0.0-pre.3", default-features = false, features = [ "static_secrets", ] } blake2 = "0.11.0-rc.3" diff --git a/ed25519-dalek/README.md b/ed25519-dalek/README.md index da29362..e193b0d 100644 --- a/ed25519-dalek/README.md +++ b/ed25519-dalek/README.md @@ -8,7 +8,7 @@ verification. To import `ed25519-dalek`, add the following to the dependencies section of your project's `Cargo.toml`: ```toml -ed25519-dalek = "3.0.0-pre.0" +ed25519-dalek = "3.0.0-pre.3" ``` # Feature Flags diff --git a/ed25519-dalek/src/lib.rs b/ed25519-dalek/src/lib.rs index ec83427..39de046 100644 --- a/ed25519-dalek/src/lib.rs +++ b/ed25519-dalek/src/lib.rs @@ -251,8 +251,7 @@ #![deny(missing_docs)] // refuse to compile if documentation is missing #![deny(clippy::unwrap_used)] // don't allow unwrap #![cfg_attr(not(any(test, feature = "batch")), forbid(unsafe_code))] -#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg, doc_cfg_hide))] -#![cfg_attr(docsrs, doc(cfg_hide(docsrs)))] +#![cfg_attr(docsrs, feature(doc_cfg))] #[cfg(feature = "batch")] extern crate alloc; diff --git a/x25519-dalek/CHANGELOG.md b/x25519-dalek/CHANGELOG.md index 346d6f6..fa88bd9 100644 --- a/x25519-dalek/CHANGELOG.md +++ b/x25519-dalek/CHANGELOG.md @@ -4,7 +4,7 @@ Entries are listed in reverse chronological order. # 3.x Series -## 3.0.0-pre.2 +## 3.0.0-pre.3 * Upgrade `rand_core` to v0.10.0-rc-2 diff --git a/x25519-dalek/Cargo.toml b/x25519-dalek/Cargo.toml index a8fcee7..7919dc6 100644 --- a/x25519-dalek/Cargo.toml +++ b/x25519-dalek/Cargo.toml @@ -6,7 +6,7 @@ edition = "2024" # - update html_root_url # - update CHANGELOG # - if any changes were made to README.md, mirror them in src/lib.rs docs -version = "3.0.0-pre.2" +version = "3.0.0-pre.3" authors = [ "Isis Lovecruft ", "DebugSteven ", @@ -39,10 +39,10 @@ rustdoc-args = [ "--cfg", "docsrs", ] -features = ["reusable_secrets", "serde", "static_secrets"] +all-features = true [dependencies] -curve25519-dalek = { version = "=5.0.0-pre.2", default-features = false } +curve25519-dalek = { version = "=5.0.0-pre.3", default-features = false } rand_core = { version = "0.10.0-rc-2", default-features = false } # optional dependencies diff --git a/x25519-dalek/README.md b/x25519-dalek/README.md index be6cc22..4a056ed 100644 --- a/x25519-dalek/README.md +++ b/x25519-dalek/README.md @@ -103,7 +103,7 @@ To install, add the following to your project's `Cargo.toml`: ```toml [dependencies] -x25519-dalek = "3.0.0-pre.0" +x25519-dalek = "3.0.0-pre.3" ``` # MSRV diff --git a/x25519-dalek/src/lib.rs b/x25519-dalek/src/lib.rs index 7886eea..5dd3581 100644 --- a/x25519-dalek/src/lib.rs +++ b/x25519-dalek/src/lib.rs @@ -15,8 +15,7 @@ // README.md as the crate documentation. #![no_std] -#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg, doc_cfg_hide))] -#![cfg_attr(docsrs, doc(cfg_hide(docsrs)))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![deny(missing_docs)] #![doc( html_logo_url = "https://cdn.jsdelivr.net/gh/dalek-cryptography/curve25519-dalek/docs/assets/dalek-logo-clear.png"