From b8c62ec4b44e691fe8fd3987f60b1a26a8e62761 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Fri, 15 Feb 2019 11:18:25 -0800 Subject: [PATCH 1/3] Attempt to fix cfg(rustdoc) on docs.rs Building the docs currently doesn't work, because rustdoc enables parts of the code (to document them) which then don't check (because there are missing exports or dependencies). This **should** fix the issue, but there's no way to test without publishing a new version. --- Cargo.toml | 2 +- src/backend/vector/mod.rs | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1a16652..d944f3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ build = "build.rs" [package.metadata.docs.rs] rustdoc-args = ["--html-in-header", ".cargo/registry/src/github.com-1ecc6299db9ec823/curve25519-dalek-0.13.2/rustdoc-include-katex-header.html"] -features = ["nightly"] +features = ["nightly", "simd_backend"] [badges] travis-ci = { repository = "dalek-cryptography/curve25519-dalek", branch = "master"} diff --git a/src/backend/vector/mod.rs b/src/backend/vector/mod.rs index d034e6c..76d36ab 100644 --- a/src/backend/vector/mod.rs +++ b/src/backend/vector/mod.rs @@ -22,13 +22,19 @@ doc(include = "../docs/parallel-formulas.md") )] -#[cfg(not(any(target_feature = "avx2", target_feature = "avx512ifma",)))] +#[cfg(not(any(target_feature = "avx2", target_feature = "avx512ifma", rustdoc)))] compile_error!("simd_backend selected without target_feature=+avx2 or +avx512ifma"); -#[cfg(any(all(target_feature = "avx2", not(target_feature = "avx512ifma")), rustdoc))] +#[cfg(any( + all(target_feature = "avx2", not(target_feature = "avx512ifma")), + rustdoc +))] #[doc(cfg(all(target_feature = "avx2", not(target_feature = "avx512ifma"))))] pub mod avx2; -#[cfg(all(target_feature = "avx2", not(target_feature = "avx512ifma")))] +#[cfg(any( + all(target_feature = "avx2", not(target_feature = "avx512ifma")), + rustdoc +))] pub(crate) use self::avx2::{ constants::BASEPOINT_ODD_LOOKUP_TABLE, edwards::CachedPoint, edwards::ExtendedPoint, }; From 64c542ec8417c7815e31f4131b08ca990eca41c1 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Fri, 15 Feb 2019 11:20:25 -0800 Subject: [PATCH 2/3] Bump patch version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index d944f3a..40a605f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curve25519-dalek" -version = "1.1.0" +version = "1.1.1" authors = ["Isis Lovecruft ", "Henry de Valence "] readme = "README.md" From 96796e620e1c817d3f62a2b6826870b3f775db02 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Fri, 15 Feb 2019 11:32:54 -0800 Subject: [PATCH 3/3] Bump patch version --- CHANGELOG.md | 8 ++++++++ Cargo.toml | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd6b29c..3363b93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ Entries are listed in reverse chronological order. +## 1.1.2 + +* Disabled KaTeX on `docs.rs` pending proper [support upstream](https://github.com/rust-lang/docs.rs/issues/302). + +## 1.1.1 + +* Fixed an issue related to `#[cfg(rustdoc)]` which prevented documenting multiple backends. + ## 1.1.0 * Adds support for precomputation for multiscalar multiplication. diff --git a/Cargo.toml b/Cargo.toml index 40a605f..8d33d2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "curve25519-dalek" -version = "1.1.1" +version = "1.1.2" authors = ["Isis Lovecruft ", "Henry de Valence "] readme = "README.md" @@ -19,7 +19,8 @@ exclude = [ build = "build.rs" [package.metadata.docs.rs] -rustdoc-args = ["--html-in-header", ".cargo/registry/src/github.com-1ecc6299db9ec823/curve25519-dalek-0.13.2/rustdoc-include-katex-header.html"] +# Disabled for now since this is borked; tracking https://github.com/rust-lang/docs.rs/issues/302 +# rustdoc-args = ["--html-in-header", ".cargo/registry/src/github.com-1ecc6299db9ec823/curve25519-dalek-0.13.2/rustdoc-include-katex-header.html"] features = ["nightly", "simd_backend"] [badges]