Skip to content

Commit

Permalink
Dependency Update
Browse files Browse the repository at this point in the history
Updates all the dependencies of the crate in order
to be able to use newer versions of rust and and
remove old lints and checks.

- Updates Rust edition to 2021
- Updates MSRV to 1.74.0
- Updates crate dependencies.
- Updates lock file.
- Updates minimum supported tpm2-tss version
  to 4.0.1.

Co-authored-by: Ionut Mihalcea <[email protected]>
Co-authored-by: Travis Finkenauer <[email protected]>
Co-authored-by: William Brown <[email protected]>
Signed-off-by: Jesper Brynolf <[email protected]>
  • Loading branch information
4 people committed Sep 9, 2024
1 parent 8ec8381 commit b34fd23
Show file tree
Hide file tree
Showing 15 changed files with 3,325 additions and 9,461 deletions.
2 changes: 1 addition & 1 deletion .clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
msrv = "1.66.0"
msrv = "1.74.0"
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Build the container
run: docker build -t ubuntucontainer tss-esapi/tests/ --file tss-esapi/tests/Dockerfile-ubuntu --target tpm2-tools
- name: Run the container
run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.66.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/all-ubuntu.sh
run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.74.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/all-ubuntu.sh
# All in one job as I think it is a big overhead to build and run the Docker
# container?
tests-ubuntu:
Expand Down Expand Up @@ -118,6 +118,6 @@ jobs:
- name: Build the container
run: docker build -t ubuntucontainer tss-esapi/tests/ --file tss-esapi/tests/Dockerfile-ubuntu --target tpm2-tss
- name: Check Clippy lints MSRV
run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.66.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/lint-checks.sh
run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.74.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/lint-checks.sh
- name: Check Clippy lints latest
run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/lint-checks.sh
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[workspace]
members = ["tss-esapi", "tss-esapi-sys"]
resolver = "2"
members = ["tss-esapi", "tss-esapi-sys"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ At the moment we test (via CI) and support the following Rust compiler versions:

* On Ubuntu we test with:
- The latest stable compiler version, as accessible through `rustup`.
- The 1.66 compiler version.
- The 1.74.0 compiler version.
* On Fedora we test with the compiler version included with the Fedora 36 release.
* On Fedora rawhide we test with the compiler version included.

Expand Down
6 changes: 3 additions & 3 deletions tss-esapi-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "tss-esapi-sys"
version = "0.5.0"
authors = ["Parsec Project Contributors"]
edition = "2018"
edition = "2021"
description = "FFI wrapper around TSS 2.0 Enhanced System API"
readme = "README.md"
keywords = ["tpm", "tss", "esys", "esapi"]
Expand All @@ -11,10 +11,10 @@ license = "Apache-2.0"
repository = "https://github.com/parallaxsecond/rust-tss-esapi"
documentation = "https://docs.rs/crate/tss-esapi-sys"
links = "tss2-esys"
rust-version = "1.66.0"
rust-version = "1.74.0"

[build-dependencies]
bindgen = { version = "0.66.1", optional = true }
bindgen = { version = "0.70.1", optional = true }
pkg-config = "0.3.18"
target-lexicon = "0.12.0"
cfg-if = "1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion tss-esapi-sys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ must therefore link to all of them at build time.

The paths to the libraries are discovered using `pkg-config` - make sure they
are discoverable in this way on your system. Our build script looks for
`tss2-esys`, `tss2-tctildr` and `tss2-mu`. A minimum version of `3.2.2` is
`tss2-esys`, `tss2-tctildr` and `tss2-mu`. A minimum version of `4.0.1` is
required for all of them.

Having installed the open-source implementation libraries at `/usr/local/lib` (by default), it
Expand Down
1 change: 1 addition & 0 deletions tss-esapi-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ pub mod tpm2_tss {
fn bindgen_builder(&self) -> bindgen::Builder {
let mut builder = bindgen::Builder::default()
.size_t_is_usize(false)
.rust_target(bindgen::RustTarget::Stable_1_73) // lower or equal to MSRV.
.clang_arg(self.tss2_esys.include_dir_arg())
.clang_arg(self.tss2_tctildr.include_dir_arg())
.clang_arg(self.tss2_mu.include_dir_arg())
Expand Down
Loading

0 comments on commit b34fd23

Please sign in to comment.