Skip to content

Commit

Permalink
Merge pull request #205 from open-quantum-safe/update-release-0.7.2
Browse files Browse the repository at this point in the history
Merge patches into 0.7.2 release line
  • Loading branch information
thomwiggers authored Aug 15, 2023
2 parents 48b0bdd + 910c736 commit 644561d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 46 deletions.
52 changes: 16 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,65 +39,45 @@ jobs:
if: startsWith(matrix.os, 'windows')
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV

- name: Install OpenSSL
if: startsWith(matrix.os, 'windows')
run: choco install openssl --limit-output

- name: Set OPENSSL_ROOT_DIR
if: startsWith(matrix.os, 'windows')
run: echo "OPENSSL_ROOT_DIR=C:/Program Files/OpenSSL-Win64" >> $env:GITHUB_ENV
run: echo "OPENSSL_ROOT_DIR=C:/Program Files/OpenSSL" >> $env:GITHUB_ENV

- name: Set OPENSSL_ROOT_DIR
if: startsWith(matrix.os, 'macos')
run: echo "OPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1" >> $GITHUB_ENV

- name: Install Rust
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
run: |
rustup set auto-self-update disable
rustup toolchain install ${{ matrix.rust }} --profile minimal --component rustfmt --component clippy
rustup default ${{ matrix.rust }}
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
echo RUST_BACKTRACE=1 >> $GITHUB_ENV
shell: bash

- uses: Swatinem/rust-cache@v1

- name: Cargo build
uses: actions-rs/cargo@v1.0.3
with:
command: build
run: cargo build

- name: Cargo test
uses: actions-rs/cargo@v1.0.3
with:
command: test
run: cargo test

- name: Cargo test --no-default-features --features serde,kems,sigs,std
uses: actions-rs/cargo@v1.0.3
with:
command: test
args: --no-default-features --features serde,kems,sigs,std --manifest-path oqs/Cargo.toml
run: cargo test --no-default-features --features serde,kems,sigs,std --manifest-path oqs/Cargo.toml

- name: Cargo test --no-default-features --features serde,kems,sigs
uses: actions-rs/cargo@v1.0.3
with:
command: test
args: --no-default-features --features serde,kems,sigs --manifest-path oqs/Cargo.toml
run: cargo test --no-default-features --features serde,kems,sigs --manifest-path oqs/Cargo.toml

- name: Cargo test --no-default-features --features non_portable,kems,sigs,std
uses: actions-rs/cargo@v1.0.3
with:
command: test
args: --no-default-features --features non_portable,kems,sigs,std --manifest-path oqs/Cargo.toml
run: cargo test --no-default-features --features non_portable,kems,sigs,std --manifest-path oqs/Cargo.toml

- name: Cargo fmt
uses: actions-rs/cargo@v1.0.3
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

- name: Cargo clippy
uses: actions-rs/cargo@v1.0.3
with:
command: clippy
run: cargo clippy

# vim: set ft=yaml ts=2 sw=2 tw=0 et :
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,23 @@ liboqs-rust: Rust bindings for liboqs

[![Build status](https://github.com/open-quantum-safe/liboqs-rust/workflows/Continuous%20integration/badge.svg)](https://github.com/open-quantum-safe/liboqs-rust/actions?query=workflow%3A"Continuous+integration")

| crate | crates.io | docs.rs | License |
|--------- |--------------------------------------------------------------------------------------------- |------------------------------------------------------------------------------------------------ |----------------------------------------------------- |
| oqs-sys | [ ![crates.io](https://img.shields.io/crates/v/oqs-sys)](https://crates.io/crates/oqs-sys) | [![crates.io/docs](https://img.shields.io/docsrs/oqs-sys)](https://docs.rs/oqs/0.7.1/oqs-sys/) | ![License](https://img.shields.io/crates/l/oqs-sys) |
| oqs | [![crates.io](https://img.shields.io/crates/v/oqs)](https://crates.io/crates/oqs) | [![crates.io/docs](https://img.shields.io/docsrs/oqs)](https://docs.rs/oqs/0.7.1/oqs/) | ![License](https://img.shields.io/crates/l/oqs) |
| crate | crates.io | docs.rs | License |
|--------- |--------------------------------------------------------------------------------------------- |--------------------------------------------------------------------------------------------------- |----------------------------------------------------- |
| oqs-sys | [ ![crates.io](https://img.shields.io/crates/v/oqs-sys)](https://crates.io/crates/oqs-sys) | [![crates.io/docs](https://img.shields.io/docsrs/oqs-sys)](https://docs.rs/crate/oqs-sys/latest/) | ![License](https://img.shields.io/crates/l/oqs-sys) |
| oqs | [![crates.io](https://img.shields.io/crates/v/oqs)](https://crates.io/crates/oqs) | [![crates.io/docs](https://img.shields.io/docsrs/oqs)](https://docs.rs/crate-oqs/latest/) | ![License](https://img.shields.io/crates/l/oqs) |

**liboqs-rust** offers two Rust wrappers for the [Open Quantum Safe](https://openquantumsafe.org/) [liboqs](https://github.com/open-quantum-safe/liboqs/) C library, which is a C library for quantum-resistant cryptographic algorithms.

* The ``oqs-sys`` crate compiles and builds ``liboqs`` and generates ``unsafe`` bindings to the C library.
* The ``oqs`` crate offers a Rust-style safe interface to the schemes included in ``liboqs``.

Versioning
----------

The version numbers follow the upstream `liboqs` versions, but with a twist.
The `liboqs` version `0.7.2` gets released as the `oqs` and `oqs-sys` version `0.7.2xx` series.
This allows us to release patch versions of the Rust bindings as `0.7.201`, `0.7.202`, and so on.

Pre-requisites
--------------

Expand Down
5 changes: 3 additions & 2 deletions oqs-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oqs-sys"
version = "0.7.2"
version = "0.7.201"
authors = ["Thom Wiggers <thom@thomwiggers.nl>"]
edition = "2021"
links = "oqs"
Expand All @@ -11,6 +11,7 @@ license = "MIT OR Apache-2.0"

# Exclude certain liboqs files
exclude = ["liboqs/tests/**", "liboqs/docs/**", "liboqs/scripts/**"]
include = ["liboqs/.Cmake/**"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -19,7 +20,7 @@ libc = "0.2"

[build-dependencies]
cmake = "0.1"
bindgen = "0.60"
bindgen = "0.65"
build-deps = "0.1"

[features]
Expand Down
4 changes: 2 additions & 2 deletions oqs-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn generate_bindings(outdir: &Path, headerfile: &str, filter: &str) {
.header(
includedir
.join("oqs")
.join(format!("{}.h", headerfile))
.join(format!("{headerfile}.h"))
.to_str()
.unwrap(),
)
Expand All @@ -31,7 +31,7 @@ fn generate_bindings(outdir: &Path, headerfile: &str, filter: &str) {
.generate()
// Unwrap the Result and panic on failure.
.expect("Unable to generate bindings")
.write_to_file(outdir.join(format!("{}_bindings.rs", headerfile)))
.write_to_file(outdir.join(format!("{headerfile}_bindings.rs")))
.expect("Couldn't write bindings!");
}

Expand Down
4 changes: 2 additions & 2 deletions oqs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oqs"
version = "0.7.2"
version = "0.7.201"
authors = ["Thom Wiggers <thom@thomwiggers.nl>"]
edition = "2021"
description = "A Rusty interface to Open-Quantum-Safe's liboqs"
Expand All @@ -16,7 +16,7 @@ serde = { version = "1.0", optional = true, default-features = false, features =

[dependencies.oqs-sys]
path = "../oqs-sys"
version = "0.7.2-rc2"
version = "0.7.2"
default-features = false

[features]
Expand Down

0 comments on commit 644561d

Please sign in to comment.