From d206c25f6c62d4da2d110bf72a580544c8c22228 Mon Sep 17 00:00:00 2001 From: chrysn Date: Wed, 6 Dec 2023 15:20:24 +0100 Subject: [PATCH 1/2] Rename packages * "edhoc-rs" => "lakers" * "edhoc-consts" => "lakers-shared" * "edhoc-crypto-rustcrypto" => "lakers-crypto-rustcrypto" * "edhoc-ead" => "lakers-ead-dispatch" * "edhoc-ead-none" => "lakers-ead-none" * "edhoc-ead-zeroconf" => "lakers-ead-zeroconf" --- .github/workflows/build-and-test.yml | 22 +++++++++++----------- Cargo.toml | 12 ++++++------ consts/Cargo.toml | 2 +- crypto/Cargo.toml | 2 +- crypto/edhoc-crypto-rustcrypto/Cargo.toml | 2 +- ead/Cargo.toml | 2 +- ead/edhoc-ead-none/Cargo.toml | 2 +- ead/edhoc-ead-zeroconf/Cargo.toml | 2 +- examples/coap/Cargo.toml | 2 +- examples/edhoc-rs-cc2538/Cargo.toml | 2 +- examples/edhoc-rs-no_std/Cargo.toml | 2 +- lib/Cargo.toml | 2 +- 12 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 2dcb70bf..b1a65ce8 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -38,8 +38,8 @@ jobs: - name: Run unit tests with default features run: RUST_BACKTRACE=1 cargo test - - name: Run unit tests with feature matrix # note that we only add `--package edhoc-ead-zeroconf` when testing with that config - run: RUST_BACKTRACE=1 cargo test -p edhoc-rs -p edhoc-crypto -p edhoc-consts ${{ matrix.ead == 'ead-zeroconf' && '-p edhoc-ead-zeroconf' || '' }} --no-default-features --features="${{ matrix.crypto_backend }}, ${{ matrix.ead }}" --no-fail-fast -- --test-threads 1 + - name: Run unit tests with feature matrix # note that we only add `--package lakers-ead-zeroconf` when testing with that config + run: RUST_BACKTRACE=1 cargo test -p lakers -p edhoc-crypto -p lakers-shared ${{ matrix.ead == 'ead-zeroconf' && '-p lakers-ead-zeroconf' || '' }} --no-default-features --features="${{ matrix.crypto_backend }}, ${{ matrix.ead }}" --no-fail-fast -- --test-threads 1 build-edhoc-package: @@ -62,7 +62,7 @@ jobs: run: sudo apt-get -y update && sudo apt-get -y install gcc-arm-none-eabi - name: Build - run: cargo build --package edhoc-rs --package edhoc-crypto --package edhoc-ead --no-default-features --features="${{ matrix.crypto_backend }}, ${{ matrix.ead }}" --release + run: cargo build --package lakers --package edhoc-crypto --package lakers-ead-dispatch --no-default-features --features="${{ matrix.crypto_backend }}, ${{ matrix.ead }}" --release generate-fstar: @@ -70,28 +70,28 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout edhoc-rs + - name: Checkout lakers uses: actions/checkout@v3 - - name: Generate fstar code over edhoc-rs and edhoc-consts + - name: Generate fstar code over lakers and lakers-shared run: | - docker run --rm -v ${{ github.workspace }}:/edhoc-rs docker.io/geonnave/hax bash -e -c " - cd edhoc-rs + docker run --rm -v ${{ github.workspace }}:/lakers docker.io/geonnave/hax bash -e -c " + cd lakers # generate the fstar files - cargo-hax -C -p edhoc-rs --no-default-features --features='edhoc-crypto/hacspec, ead-none' --release \; into -i '-edhoc_rs::generate_connection_identifier_cbor -edhoc_rs::generate_connection_identifier' fstar - cargo-hax -C -p edhoc-consts \; into fstar + cargo-hax -C -p lakers --no-default-features --features='edhoc-crypto/hacspec, ead-none' --release \; into -i '-lakers::generate_connection_identifier_cbor -lakers::generate_connection_identifier' fstar + cargo-hax -C -p lakers-shared \; into fstar # even if fstar generation was ok, fail if something is not implemented [ -z "$(find -name *.fst -type f | xargs grep 'something is not implemented yet')" ] " - zip -j -r edhoc-rs-fstar.zip $(find . -name *fst) + zip -j -r lakers-fstar.zip $(find . -name *fst) - name: Upload artifact uses: actions/upload-artifact@v3 with: name: fstar-code - path: ./edhoc-rs-fstar.zip + path: ./lakers-fstar.zip build-static-lib-and-headers: diff --git a/Cargo.toml b/Cargo.toml index 61c86bb6..eb248125 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,19 +40,19 @@ license = "BSD-3-Clause" [workspace.dependencies] -edhoc-consts = { path = "consts/", version = "^0.4.0-alpha.1" } -edhoc-ead = { path = "ead/", version = "^0.4.0-alpha.1", default-features = false } -edhoc-ead-none = { path = "ead/edhoc-ead-none/", version = "^0.4.0-alpha.1" } -edhoc-ead-zeroconf = { path = "ead/edhoc-ead-zeroconf/", version = "^0.4.0-alpha.1" } +edhoc-consts = { package = "lakers-shared", path = "consts/", version = "^0.4.0-alpha.1" } +edhoc-ead = { package = "lakers-ead-dispatch", path = "ead/", version = "^0.4.0-alpha.1", default-features = false } +edhoc-ead-none = { package = "lakers-ead-none", path = "ead/edhoc-ead-none/", version = "^0.4.0-alpha.1" } +edhoc-ead-zeroconf = { package = "lakers-ead-zeroconf", path = "ead/edhoc-ead-zeroconf/", version = "^0.4.0-alpha.1" } edhoc-crypto = { path = "crypto/", version = "^0.4.0-alpha.1" } edhoc-crypto-cc2538 = { path = "crypto/edhoc-crypto-cc2538/", version = "^0.4.0-alpha.1" } edhoc-crypto-cryptocell310 = { path = "crypto/edhoc-crypto-cryptocell310-sys/", version = "^0.4.0-alpha.1" } edhoc-crypto-hacspec = { path = "crypto/edhoc-crypto-hacspec/", version = "^0.4.0-alpha.1" } edhoc-crypto-psa = { path = "crypto/edhoc-crypto-psa/", version = "^0.4.0-alpha.1" } -edhoc-crypto-rustcrypto = { path = "crypto/edhoc-crypto-rustcrypto/", version = "^0.4.0-alpha.1" } +edhoc-crypto-rustcrypto = { package = "lakers-crypto-rustcrypto", path = "crypto/edhoc-crypto-rustcrypto/", version = "^0.4.0-alpha.1" } -edhoc-rs = { path = "lib/", version = "^0.4.0-alpha.1", default-features = false } +edhoc-rs = { package = "lakers", path = "lib/", version = "^0.4.0-alpha.1", default-features = false } [patch.crates-io] hacspec-lib = { git = "https://github.com/malishav/hacspec", branch = "aesccm" } diff --git a/consts/Cargo.toml b/consts/Cargo.toml index dd8ee43e..1e355b5e 100644 --- a/consts/Cargo.toml +++ b/consts/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "edhoc-consts" +name = "lakers-shared" version.workspace = true edition = "2021" authors = ["Mališa Vučinić "] diff --git a/crypto/Cargo.toml b/crypto/Cargo.toml index 27b66ad9..3f1ad93c 100644 --- a/crypto/Cargo.toml +++ b/crypto/Cargo.toml @@ -8,7 +8,7 @@ description = "EDHOC crypto library dispatch crate" repository.workspace = true [dependencies] -edhoc-consts = { path = "../consts", default-features = false } +edhoc-consts = { package = "lakers-shared", path = "../consts", default-features = false } # hacspec edhoc-crypto-hacspec = { workspace = true, optional = true } diff --git a/crypto/edhoc-crypto-rustcrypto/Cargo.toml b/crypto/edhoc-crypto-rustcrypto/Cargo.toml index 7854e627..8129310d 100644 --- a/crypto/edhoc-crypto-rustcrypto/Cargo.toml +++ b/crypto/edhoc-crypto-rustcrypto/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "edhoc-crypto-rustcrypto" +name = "lakers-crypto-rustcrypto" version.workspace = true edition = "2021" authors = [ "Christian Amsüss " ] diff --git a/ead/Cargo.toml b/ead/Cargo.toml index 718ce0fc..a60c0b1f 100644 --- a/ead/Cargo.toml +++ b/ead/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "edhoc-ead" +name = "lakers-ead-dispatch" version.workspace = true edition = "2021" authors = ["Geovane Fedrecheski "] diff --git a/ead/edhoc-ead-none/Cargo.toml b/ead/edhoc-ead-none/Cargo.toml index 340a9684..5a7dfb00 100644 --- a/ead/edhoc-ead-none/Cargo.toml +++ b/ead/edhoc-ead-none/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "edhoc-ead-none" +name = "lakers-ead-none" version.workspace = true edition = "2021" authors = ["Geovane Fedrecheski "] diff --git a/ead/edhoc-ead-zeroconf/Cargo.toml b/ead/edhoc-ead-zeroconf/Cargo.toml index 32fa8f70..34d7a7d9 100644 --- a/ead/edhoc-ead-zeroconf/Cargo.toml +++ b/ead/edhoc-ead-zeroconf/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "edhoc-ead-zeroconf" +name = "lakers-ead-zeroconf" version.workspace = true edition = "2021" authors = ["Geovane Fedrecheski "] diff --git a/examples/coap/Cargo.toml b/examples/coap/Cargo.toml index 4213be41..f46941d6 100644 --- a/examples/coap/Cargo.toml +++ b/examples/coap/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -edhoc-rs = { path = "../../lib" } +edhoc-rs = { package = "lakers", path = "../../lib" } edhoc-crypto = { path = "../../crypto/", features = [ "hacspec" ] } hexlit = "0.5.3" coap = { version = "0.13" } diff --git a/examples/edhoc-rs-cc2538/Cargo.toml b/examples/edhoc-rs-cc2538/Cargo.toml index cef6553f..782cc30d 100644 --- a/examples/edhoc-rs-cc2538/Cargo.toml +++ b/examples/edhoc-rs-cc2538/Cargo.toml @@ -7,7 +7,7 @@ license.workspace = true description = "edhoc-rs example on CC2538 SoC" [dependencies] -edhoc-rs = { path = "../../lib", default-features = false } +edhoc-rs = { package = "lakers", path = "../../lib", default-features = false } edhoc-crypto = { path = "../../crypto", default-features = false } # depend on an allocator embedded-alloc = "0.5.0" diff --git a/examples/edhoc-rs-no_std/Cargo.toml b/examples/edhoc-rs-no_std/Cargo.toml index 852cfe50..01fb2e1a 100644 --- a/examples/edhoc-rs-no_std/Cargo.toml +++ b/examples/edhoc-rs-no_std/Cargo.toml @@ -5,7 +5,7 @@ version = "0.1.0" edition = "2021" [dependencies] -edhoc-rs = { path = "../../lib", default-features = false } +edhoc-rs = { package = "lakers", path = "../../lib", default-features = false } edhoc-crypto = { path = "../../crypto", default-features = false } hexlit = "0.5.3" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 1eecaa4d..96c2d12d 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "edhoc-rs" +name = "lakers" version.workspace = true edition = "2021" authors = ["Mališa Vučinić "] From 1be0262d6ad73518c03e38f5b6c52472c331738e Mon Sep 17 00:00:00 2001 From: chrysn Date: Wed, 6 Dec 2023 16:08:06 +0100 Subject: [PATCH 2/2] readme: Advertise as 'lakers' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad44c14a..94476bfe 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# edhoc-rs +# lakers: EDHOC implemented in Rust [![Build and test](https://github.com/openwsn-berkeley/edhoc-rs/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/openwsn-berkeley/edhoc-rs/actions/workflows/build-and-test.yml)