From 49294dd5a1c57384ba67d32f49cdb20a5eb597a0 Mon Sep 17 00:00:00 2001 From: Joe Birr-Pixton Date: Tue, 8 Oct 2024 20:03:06 +0100 Subject: [PATCH 1/5] lints: add MSRV check --- .github/workflows/lints.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index 694ae6019..1d85315f5 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -10,7 +10,22 @@ env: CARGO_TERM_COLOR: always jobs: - build: + msrv: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Install MSRV toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.72" + + - name: Check MSRV + run: cargo build --lib --all-features + + lints: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From eab2e853c0f46f01eb32fd49ca1c77b36026df32 Mon Sep 17 00:00:00 2001 From: Joe Birr-Pixton Date: Tue, 8 Oct 2024 19:57:38 +0100 Subject: [PATCH 2/5] Fix MSRV-breaking dependency on prelude for `size_of` --- graviola/src/low/generic/zeroise.rs | 1 + graviola/tests/zeroing.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/graviola/src/low/generic/zeroise.rs b/graviola/src/low/generic/zeroise.rs index 6a6640b6f..b55f906d3 100644 --- a/graviola/src/low/generic/zeroise.rs +++ b/graviola/src/low/generic/zeroise.rs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT-0 use crate::low::zero_bytes; +use core::mem::{size_of, size_of_val}; /// Writes zeroes over the whole of the `v` slice. pub(crate) fn zeroise(v: &mut [T]) { diff --git a/graviola/tests/zeroing.rs b/graviola/tests/zeroing.rs index 6719e4cc5..27c8b9847 100644 --- a/graviola/tests/zeroing.rs +++ b/graviola/tests/zeroing.rs @@ -11,6 +11,7 @@ #![cfg(target_os = "linux")] +use core::mem::size_of; use core::ops::Deref; use core::pin::Pin; use core::ptr; From 18001d401fa800fa1931b8e0568854b337aeb060 Mon Sep 17 00:00:00 2001 From: Joe Birr-Pixton Date: Tue, 8 Oct 2024 19:58:10 +0100 Subject: [PATCH 3/5] Tone-down cautious language --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 44a1d47f4..783ecc0c3 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,9 @@ needed: just the Rust compiler. Compiles in less than one second. ## Status -Active development. Do not use. Currently external contributions -are not welcomed; please do not file issues or PRs. +This project is very new, so exercise due caution. At the moment +there is not a public API outside of the `rustls` `CryptoProvider` -- +so you can use this for TLS, but not for other uses. ## Goals From 8e1de11b4ccb13979ff5a112f964d3e1d1813b94 Mon Sep 17 00:00:00 2001 From: Joe Birr-Pixton Date: Tue, 8 Oct 2024 19:58:24 +0100 Subject: [PATCH 4/5] Add coverage script --- admin/coverage | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 admin/coverage diff --git a/admin/coverage b/admin/coverage new file mode 100755 index 000000000..78b5304bd --- /dev/null +++ b/admin/coverage @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -e + +source <(cargo llvm-cov show-env --export-prefix "$@") +cargo llvm-cov clean --workspace + +cargo build --locked --all-targets --all-features +cargo test --locked --all-features +env GRAVIOLA_CPU_DISABLE_sha=1 GRAVIOLA_CPU_DISABLE_bmi2=1 cargo test --locked --all-features +cargo run --example client https://jbp.io >/dev/null + +cargo llvm-cov report "$@" From 7a8edc8691dd5f36b3dabcb90aa21577eabb2037 Mon Sep 17 00:00:00 2001 From: Joe Birr-Pixton Date: Tue, 8 Oct 2024 20:07:17 +0100 Subject: [PATCH 5/5] Prepare 0.1.1 --- Cargo.lock | 2 +- graviola/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fb4f4ac59..aa2016374 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -745,7 +745,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "graviola" -version = "0.1.0" +version = "0.1.1" dependencies = [ "cfg-if", "getrandom", diff --git a/graviola/Cargo.toml b/graviola/Cargo.toml index 4c36f2568..36a5f9595 100644 --- a/graviola/Cargo.toml +++ b/graviola/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "graviola" -version = "0.1.0" +version = "0.1.1" edition = "2021" repository = "https://github.com/ctz/graviola/" license = "Apache-2.0 OR ISC OR MIT-0"