rust: Prepare Cargo.toml for crates.io

Renames pv crate to s390_pv and pv_core to s390_pv_core. pv was already
taken on crates.io.

Bump the versions of all crates to 0.10.0. From now on we follow Semver
compatibility rules when it comes to updates. patch-level updates will
not introduce any backwards incompatible changes. For now all crates in
this directory will have the same version number. A version update may,
therefore, not add any new things.

Library users in this repository still use the non prefixed names and
rename the crate in the Cargo.toml. Doc-tests have to use the new name
however.

Add some Cargo metadata to the Cargo.toml.

Acked-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
Steffen Eiden
2024-04-05 13:28:04 +02:00
parent 4a76efe6d5
commit 4d57ff046d
17 changed files with 82 additions and 72 deletions

View File

@@ -38,7 +38,7 @@ macro_rules! static_assert {
///
/// # Example
/// ```rust
/// # use pv_core::assert_size;
/// # use s390_pv_core::assert_size;
/// # fn main() {}
/// #[repr(C)]
/// struct c_struct {

View File

@@ -119,7 +119,7 @@ impl From<&u64> for Lsb0Flags64 {
/// * `ctx` - Error context string in case of an error
/// ```rust
/// # use std::error::Error;
/// # use pv_core::misc::try_parse_u128;
/// # use s390_pv_core::misc::try_parse_u128;
/// # fn main() -> Result<(), Box<dyn Error>> {
/// let hex = "11223344556677889900aabbccddeeff";
/// try_parse_u128(&hex, "The test")?;
@@ -155,7 +155,7 @@ pub fn try_parse_u128(hex_str: &str, ctx: &str) -> Result<[u8; 16]> {
/// * `ctx` - Error context string in case of an error
/// ```rust
/// # use std::error::Error;
/// # use pv_core::misc::try_parse_u64;
/// # use s390_pv_core::misc::try_parse_u64;
/// # fn main() -> Result<(), Box<dyn Error>> {
/// let hex = "1234567890abcdef";
/// try_parse_u64(&hex, "The test")?;

View File

@@ -10,8 +10,8 @@ use zerocopy::U32;
///
/// The magic value is ASCII:
/// ```rust
/// # use pv_core::attest::AttestationMagic;
/// # use pv_core::request::MagicValue;
/// # use s390_pv_core::attest::AttestationMagic;
/// # use s390_pv_core::request::MagicValue;
/// # fn main() {
/// # let magic = &
/// [0u8; 8]

View File

@@ -173,10 +173,10 @@ pub enum UvcSuccess {
/// forward to Firmware.
///
/// ```rust,no_run
/// # use pv_core::uv::UvDevice;
/// # use pv_core::uv::AddCmd;
/// # use s390_pv_core::uv::UvDevice;
/// # use s390_pv_core::uv::AddCmd;
/// # use std::fs::File;
/// # fn main() -> pv_core::Result<()> {
/// # fn main() -> s390_pv_core::Result<()> {
/// let mut file = File::open("request")?;
/// let uv = UvDevice::open()?;
/// let mut cmd = AddCmd::new(&mut file)?;

View File

@@ -27,9 +27,9 @@ use zerocopy::{AsBytes, FromZeroes};
/// # Example
///
/// ```rust,no_run
/// # use pv_core::uv::UvDevice;
/// # use pv_core::uv::AttestationCmd;
/// # fn main() -> pv_core::Result<()> {
/// # use s390_pv_core::uv::UvDevice;
/// # use s390_pv_core::uv::AttestationCmd;
/// # fn main() -> s390_pv_core::Result<()> {
/// let arcb = std::fs::read("arcb")?.into();
/// let user_data = vec![0, 1, 2, 3];
/// // Hard-coded example

View File

@@ -119,7 +119,7 @@ impl SecretEntry {
///
/// The slice is guaranteed to be 32 bytes long.
/// ```rust
/// # use pv_core::uv::SecretEntry;
/// # use s390_pv_core::uv::SecretEntry;
/// # use zerocopy::FromZeroes;
/// # let secr = SecretEntry::new_zeroed();
/// # assert_eq!(secr.id().len(), 32);

View File

@@ -15,8 +15,8 @@ use zerocopy::{AsBytes, U16};
///
/// The magic value is ASCII:
/// ```rust
/// # use pv_core::secret::AddSecretMagic;
/// # use pv_core::request::MagicValue;
/// # use s390_pv_core::secret::AddSecretMagic;
/// # use s390_pv_core::request::MagicValue;
/// # fn main() {
/// # let magic =
/// b"asrcbM"