mirror of
https://github.com/saymrwulf/betrusted-curve25519-dalek-source.git
synced 2026-09-04 20:24:07 +00:00
Fix docsrs build (#505)
* Add docsrs build to CI * Put cfg flags in both RUSTFLAGS and RUSTDOCFLAGS
This commit is contained in:
parent
b375b46d37
commit
3b71630d9f
3 changed files with 17 additions and 6 deletions
9
.github/workflows/rust.yml
vendored
9
.github/workflows/rust.yml
vendored
|
|
@ -69,6 +69,15 @@ jobs:
|
|||
RUSTFLAGS: '--cfg curve25519_dalek_backend="simd" -C target_feature=+avx512ifma'
|
||||
run: cargo build --target x86_64-unknown-linux-gnu
|
||||
|
||||
build-docs:
|
||||
name: Build docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
- run: make doc
|
||||
- run: make doc-internal
|
||||
|
||||
cross:
|
||||
strategy:
|
||||
matrix:
|
||||
|
|
|
|||
9
Makefile
9
Makefile
|
|
@ -1,7 +1,12 @@
|
|||
FEATURES := serde rand_core digest
|
||||
|
||||
export RUSTFLAGS := --cfg=curve25519_dalek_backend="simd"
|
||||
export RUSTDOCFLAGS := \
|
||||
--cfg docsrs \
|
||||
--html-in-header docs/assets/rustdoc-include-katex-header.html
|
||||
|
||||
doc:
|
||||
cargo +nightly rustdoc --features "$(FEATURES)" -- --html-in-header docs/assets/rustdoc-include-katex-header.html --cfg docsrs --cfg=curve25519_dalek_backend=\"simd\"
|
||||
cargo +nightly rustdoc --features "$(FEATURES)"
|
||||
|
||||
doc-internal:
|
||||
cargo +nightly rustdoc --features "$(FEATURES)" -- --html-in-header docs/assets/rustdoc-include-katex-header.html --document-private-items --cfg docsrs --cfg=curve25519_dalek_backend=\"simd\"
|
||||
cargo +nightly rustdoc --features "$(FEATURES)" -- --document-private-items
|
||||
|
|
|
|||
|
|
@ -50,8 +50,5 @@ pub mod scalar_mul;
|
|||
))]
|
||||
pub(crate) use self::avx2::constants::BASEPOINT_ODD_LOOKUP_TABLE;
|
||||
|
||||
#[cfg(any(
|
||||
all(target_feature = "avx512ifma", feature = "precomputed-tables"),
|
||||
all(docsrs, target_arch = "x86_64")
|
||||
))]
|
||||
#[cfg(all(target_feature = "avx512ifma", feature = "precomputed-tables"))]
|
||||
pub(crate) use self::ifma::constants::BASEPOINT_ODD_LOOKUP_TABLE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue