rust: Refactoring and reduce API surface

Prepare pv & pv_core crates to be released on crates.io:
* Remove any unused API to stay flexible
* Remove utils dependency
* Move cli, tmpfile and version utilities to local utils crate
* Use the new utilities in the pv tools
* Rename Secret into Confidential to avoid confusion of Secret (now
  Confidential) and AddSecret requests.
* Move the uvsecret module out of the request module and change the name
  to secret.
* Cleanup dependencies
* Precise and correct minimal dependency versions
* Inline `Aes256Key::from_digest`

The cleanup ensures that the code also compiles with the dependencies
resolved to their minimal versions using:

$ cargo +nightly -Z minimal-versions update
$ cargo build

For more information refer to this blog post:
https://users.rust-lang.org/t/psa-please-specify-precise-dependency-versions-in-cargo-toml/71277/8

Signed-off-by: Marc Hartmayer <mhartmay@de.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
Steffen Eiden
2024-05-21 16:26:51 +02:00
parent 5648b924d6
commit 381fecfc44
44 changed files with 499 additions and 490 deletions
+6 -4
View File
@@ -414,7 +414,6 @@ name = "pv"
version = "1.0.0"
dependencies = [
"byteorder",
"clap",
"curl",
"log",
"openssl",
@@ -423,7 +422,6 @@ dependencies = [
"serde",
"serde_test",
"thiserror",
"utils",
"zerocopy",
]
@@ -438,7 +436,6 @@ dependencies = [
"serde",
"serde_test",
"thiserror",
"utils",
"zerocopy",
]
@@ -449,7 +446,6 @@ dependencies = [
"clap",
"lazy_static",
"openssl",
"openssl-sys",
"pv_core",
"rand",
"regex",
@@ -687,6 +683,12 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "utils"
version = "0.1.0"
dependencies = [
"clap",
"libc",
"log",
"pv",
]
[[package]]
name = "vcpkg"