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 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/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 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 "$@" 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" 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;