From e5ecb2d3f4f7b85fdf103ec2f59687e030b6b83b Mon Sep 17 00:00:00 2001 From: Conrado Gouvea Date: Thu, 2 Mar 2023 18:19:53 -0300 Subject: [PATCH] renamed gendoc to gencode; make it unpublishable (#260) --- .github/workflows/coverage.yaml | 4 ++-- .github/workflows/main.yml | 2 +- Cargo.toml | 2 +- README.md | 2 +- {gendoc => gencode}/Cargo.toml | 5 +++-- {gendoc => gencode}/src/main.rs | 4 +++- 6 files changed, 11 insertions(+), 8 deletions(-) rename {gendoc => gencode}/Cargo.toml (86%) rename {gendoc => gencode}/src/main.rs (98%) diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 0df0474..235e689 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -38,10 +38,10 @@ jobs: run: cargo install cargo-llvm-cov - name: Run tests - run: cargo llvm-cov --lcov --no-report --ignore-filename-regex 'tests.rs|benches.rs|gendoc' + run: cargo llvm-cov --lcov --no-report --ignore-filename-regex 'tests.rs|benches.rs|gencode' - name: Generate coverage report - run: cargo llvm-cov report --lcov --ignore-filename-regex 'tests.rs|benches.rs|gendoc' --output-path lcov.info + run: cargo llvm-cov report --lcov --ignore-filename-regex 'tests.rs|benches.rs|gencode' --output-path lcov.info - name: Upload coverage report to Codecov uses: codecov/codecov-action@v3.1.1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 17cac4c..771e086 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -88,7 +88,7 @@ jobs: - uses: actions-rs/cargo@v1.0.3 with: command: run - args: --bin gendoc -- --check + args: --bin gencode -- --check docs: name: Check Rust doc diff --git a/Cargo.toml b/Cargo.toml index 06d8ce0..cbf054f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,5 +8,5 @@ members = [ "frost-ristretto255", "frost-secp256k1", "frost-rerandomized", - "gendoc" + "gencode" ] diff --git a/README.md b/README.md index 74d3642..b7cd4b0 100644 --- a/README.md +++ b/README.md @@ -41,4 +41,4 @@ dependency. Test coverage checks are performed in the pipeline. This is cofigured here: `.github/workflows/coverage.yaml` To run these locally: 1. Install coverage tool by running `cargo install cargo-llvm-cov` -2. Run `cargo llvm-cov --ignore-filename-regex 'tests.rs|benches.rs|gendoc'` (you may be asked if you want to install `llvm-tools-preview`, if so type `Y`) +2. Run `cargo llvm-cov --ignore-filename-regex 'tests.rs|benches.rs|gencode'` (you may be asked if you want to install `llvm-tools-preview`, if so type `Y`) diff --git a/gendoc/Cargo.toml b/gencode/Cargo.toml similarity index 86% rename from gendoc/Cargo.toml rename to gencode/Cargo.toml index bd20efc..b951cf7 100644 --- a/gendoc/Cargo.toml +++ b/gencode/Cargo.toml @@ -1,7 +1,8 @@ [package] -name = "gendoc" +name = "gencode" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -9,7 +10,7 @@ edition = "2021" regex = "1.6.0" [[bin]] -name = "gendoc" +name = "gencode" path = "src/main.rs" # Disables non-criterion benchmark which is not used; prevents errors # when using criterion-specific flags diff --git a/gendoc/src/main.rs b/gencode/src/main.rs similarity index 98% rename from gendoc/src/main.rs rename to gencode/src/main.rs index 11851f8..563c404 100644 --- a/gendoc/src/main.rs +++ b/gencode/src/main.rs @@ -1,5 +1,7 @@ //! Generate documentation for a ciphersuite based on another ciphersuite implementation. //! +//! This is an internal tool used for development. +//! //! The documentation for each ciphersuite is very similar, with the only difference being //! the ciphersuite name. //! @@ -8,7 +10,7 @@ //! uses frost-ristretto255 as the "canonical" one, so: //! //! - Change any documentation of a public function or struct in `frost-ristretto255/src/lib.rs` -//! - Run `cargo run --manifest-path gendoc/Cargo.toml` to update the documentation +//! - Run `cargo run --manifest-path gencode/Cargo.toml` to update the documentation //! of the other ciphersuites. use std::{env, fs, iter::zip, process::ExitCode};