From bc2c55380ef2adea22574b67baf14c28d44020c0 Mon Sep 17 00:00:00 2001 From: Nick Santana Date: Mon, 13 Feb 2023 08:29:18 -0800 Subject: [PATCH] Narrow crate scope to `attestation` Previously the crates were named to contain all future protobuf types and services, now the crates have been named to only support `attestation` with the intent to create dedicated crates for other gRPC communications. --- crates/Cargo.toml | 11 ++++++---- crates/attestation/grpcio/Cargo.toml | 15 +++++++++++++ crates/attestation/grpcio/README.md | 22 +++++++++++++++++++ crates/{ => attestation}/grpcio/src/lib.rs | 0 .../protobuf-types}/Cargo.toml | 6 ++--- crates/attestation/protobuf-types/README.md | 22 +++++++++++++++++++ .../protobuf-types}/src/lib.rs | 0 crates/attestation/tonic/Cargo.toml | 15 +++++++++++++ crates/attestation/tonic/README.md | 22 +++++++++++++++++++ crates/{ => attestation}/tonic/src/lib.rs | 0 crates/grpcio/Cargo.toml | 15 ------------- crates/grpcio/README.md | 21 ------------------ crates/messages/README.md | 21 ------------------ crates/tonic/Cargo.toml | 15 ------------- crates/tonic/README.md | 21 ------------------ 15 files changed, 106 insertions(+), 100 deletions(-) create mode 100644 crates/attestation/grpcio/Cargo.toml create mode 100644 crates/attestation/grpcio/README.md rename crates/{ => attestation}/grpcio/src/lib.rs (100%) rename crates/{messages => attestation/protobuf-types}/Cargo.toml (60%) create mode 100644 crates/attestation/protobuf-types/README.md rename crates/{messages => attestation/protobuf-types}/src/lib.rs (100%) create mode 100644 crates/attestation/tonic/Cargo.toml create mode 100644 crates/attestation/tonic/README.md rename crates/{ => attestation}/tonic/src/lib.rs (100%) delete mode 100644 crates/grpcio/Cargo.toml delete mode 100644 crates/grpcio/README.md delete mode 100644 crates/messages/README.md delete mode 100644 crates/tonic/Cargo.toml delete mode 100644 crates/tonic/README.md diff --git a/crates/Cargo.toml b/crates/Cargo.toml index 0662042..69ba389 100644 --- a/crates/Cargo.toml +++ b/crates/Cargo.toml @@ -1,14 +1,17 @@ [workspace] members = [ - "grpcio", - "messages", - "tonic", + "attestation/grpcio", + "attestation/tonic", + "attestation/protobuf-types", ] # We need to explicitly specify resolver 2. # We shouldn't have to per https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html, but that does not appear to be the case resolver = "2" +[workspace.package] +rust-version = "1.67.0" + [profile.release] lto = "thin" @@ -24,5 +27,5 @@ tag-name = "v{{version}}" # common format and are always next to the Cargo.toml for their respective # package. pre-release-replacements = [ - {file="README.md", search="mc-probufs-[a-z-]+/[0-9.]+", replace="{{crate_name}}/{{version}}"}, + {file="README.md", search="mc-[a-z-]+/[0-9.]+", replace="{{crate_name}}/{{version}}"}, ] diff --git a/crates/attestation/grpcio/Cargo.toml b/crates/attestation/grpcio/Cargo.toml new file mode 100644 index 0000000..d67a0c7 --- /dev/null +++ b/crates/attestation/grpcio/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "mc-attestation-grpcio" +version = "0.1.0" +edition = "2021" +authors = ["MobileCoin"] +rust-version = { workspace = true } +license = "Apache-2.0" +readme = "README.md" +repository = "https://github.com/mobilecoinfoundation/protobufs" +description = "grpcio enclave attestation gRPC client and server" +categories = ["api-bindings", "encoding"] +keywords = ["grpc", "protobuf", "rpc"] + +[dependencies] +mc-attestation-protobuf-types = { path = "../protobuf-types", version = "0.1.0" } diff --git a/crates/attestation/grpcio/README.md b/crates/attestation/grpcio/README.md new file mode 100644 index 0000000..020252f --- /dev/null +++ b/crates/attestation/grpcio/README.md @@ -0,0 +1,22 @@ +# MobileCoin: grpcio enclave attestation gRPC client and server + +[![Project Chat][chat-image]][chat-link]![License][license-image]![Target][target-image][![Crates.io][crate-image]][crate-link][![Docs Status][docs-image]][docs-link][![Dependency Status][deps-image]][deps-link] + +[grpcio](https://docs.rs/grpcio/latest/grpcio/) implementation of gRPC client +and server for enclave attestation. + +[chat-image]: https://img.shields.io/discord/844353360348971068?style=flat-square +[chat-link]: https://mobilecoin.chat +[license-image]: https://img.shields.io/crates/l/mc-attestation-grpcio?style=flat-square +[target-image]: https://img.shields.io/badge/target-x86__64-blue?style=flat-square +[crate-image]: https://img.shields.io/crates/v/mc-attestation-grpcio.svg?style=flat-square +[crate-link]: https://crates.io/crates/mc-attestation-grpcio +[docs-image]: https://img.shields.io/docsrs/mc-attestation-grpcio?style=flat-square +[docs-link]: https://docs.rs/crate/mc-attestation-grpcio +[deps-image]: https://deps.rs/crate/mc-attestation-grpcio/0.1.0/status.svg?style=flat-square +[deps-link]: https://deps.rs/crate/mc-attestation-grpcio/0.1.0 diff --git a/crates/grpcio/src/lib.rs b/crates/attestation/grpcio/src/lib.rs similarity index 100% rename from crates/grpcio/src/lib.rs rename to crates/attestation/grpcio/src/lib.rs diff --git a/crates/messages/Cargo.toml b/crates/attestation/protobuf-types/Cargo.toml similarity index 60% rename from crates/messages/Cargo.toml rename to crates/attestation/protobuf-types/Cargo.toml index 79c7b07..16e4a2e 100644 --- a/crates/messages/Cargo.toml +++ b/crates/attestation/protobuf-types/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "mc-probufs-messages" +name = "mc-attestation-protobuf-types" version = "0.1.0" edition = "2021" authors = ["MobileCoin"] -rust-version = "1.65" +rust-version = { workspace = true } license = "Apache-2.0" readme = "README.md" -repository = "https://github.com/mobilecoinfoundation/probufs" +repository = "https://github.com/mobilecoinfoundation/protobufs" description = "Common grpc messages" categories = ["encoding"] keywords = ["protobuf"] diff --git a/crates/attestation/protobuf-types/README.md b/crates/attestation/protobuf-types/README.md new file mode 100644 index 0000000..b23ccd9 --- /dev/null +++ b/crates/attestation/protobuf-types/README.md @@ -0,0 +1,22 @@ +# MobileCoin: Common protobuf message types + +[![Project Chat][chat-image]][chat-link]![License][license-image]![Target][target-image][![Crates.io][crate-image]][crate-link][![Docs Status][docs-image]][docs-link][![Dependency Status][deps-image]][deps-link] + +Common protobuf message types. [prost](https://docs.rs/prost/latest/prost/) is +used for the message format. + +[chat-image]: https://img.shields.io/discord/844353360348971068?style=flat-square +[chat-link]: https://mobilecoin.chat +[license-image]: https://img.shields.io/crates/l/mc-attestation-protobuf-types?style=flat-square +[target-image]: https://img.shields.io/badge/target-x86__64-blue?style=flat-square +[crate-image]: https://img.shields.io/crates/v/mc-attestation-protobuf-types.svg?style=flat-square +[crate-link]: https://crates.io/crates/mc-attestation-protobuf-types +[docs-image]: https://img.shields.io/docsrs/mc-attestation-protobuf-types?style=flat-square +[docs-link]: https://docs.rs/crate/mc-attestation-protobuf-types +[deps-image]: https://deps.rs/crate/mc-attestation-protobuf-types/0.1.0/status.svg?style=flat-square +[deps-link]: https://deps.rs/crate/mc-attestation-protobuf-types/0.1.0 diff --git a/crates/messages/src/lib.rs b/crates/attestation/protobuf-types/src/lib.rs similarity index 100% rename from crates/messages/src/lib.rs rename to crates/attestation/protobuf-types/src/lib.rs diff --git a/crates/attestation/tonic/Cargo.toml b/crates/attestation/tonic/Cargo.toml new file mode 100644 index 0000000..c227792 --- /dev/null +++ b/crates/attestation/tonic/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "mc-attestation-tonic" +version = "0.1.0" +edition = "2021" +authors = ["MobileCoin"] +rust-version = { workspace = true } +license = "Apache-2.0" +readme = "README.md" +repository = "https://github.com/mobilecoinfoundation/protobufs" +description = "Tonic enclave attestation gRPC client and server" +categories = ["api-bindings", "encoding"] +keywords = ["grpc", "protobuf", "rpc"] + +[dependencies] +mc-attestation-protobuf-types = { path = "../protobuf-types", version = "0.1.0" } diff --git a/crates/attestation/tonic/README.md b/crates/attestation/tonic/README.md new file mode 100644 index 0000000..96a470d --- /dev/null +++ b/crates/attestation/tonic/README.md @@ -0,0 +1,22 @@ +# MobileCoin: Tonic enclave attestation gRPC client and server + +[![Project Chat][chat-image]][chat-link]![License][license-image]![Target][target-image][![Crates.io][crate-image]][crate-link][![Docs Status][docs-image]][docs-link][![Dependency Status][deps-image]][deps-link] + +[Tonic](https://docs.rs/tonic/latest/tonic/) implementation of gRPC client and +server for attesting to enclaves. + +[chat-image]: https://img.shields.io/discord/844353360348971068?style=flat-square +[chat-link]: https://mobilecoin.chat +[license-image]: https://img.shields.io/crates/l/mc-mc-attestation-tonic?style=flat-square +[target-image]: https://img.shields.io/badge/target-x86__64-blue?style=flat-square +[crate-image]: https://img.shields.io/crates/v/mc-mc-attestation-tonic.svg?style=flat-square +[crate-link]: https://crates.io/crates/mc-mc-attestation-tonic +[docs-image]: https://img.shields.io/docsrs/mc-mc-attestation-tonic?style=flat-square +[docs-link]: https://docs.rs/crate/mc-mc-attestation-tonic +[deps-image]: https://deps.rs/crate/mc-mc-attestation-tonic/0.1.0/status.svg?style=flat-square +[deps-link]: https://deps.rs/crate/mc-mc-attestation-tonic/0.1.0 diff --git a/crates/tonic/src/lib.rs b/crates/attestation/tonic/src/lib.rs similarity index 100% rename from crates/tonic/src/lib.rs rename to crates/attestation/tonic/src/lib.rs diff --git a/crates/grpcio/Cargo.toml b/crates/grpcio/Cargo.toml deleted file mode 100644 index cc8fa01..0000000 --- a/crates/grpcio/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "mc-probufs-grpcio" -version = "0.1.0" -edition = "2021" -authors = ["MobileCoin"] -rust-version = "1.65" -license = "Apache-2.0" -readme = "README.md" -repository = "https://github.com/mobilecoinfoundation/probufs" -description = "grpcio protobufs client and server" -categories = ["api-bindings", "encoding"] -keywords = ["grpc", "protobuf", "rpc"] - -[dependencies] -mc-probufs-messages = { path = "../messages", version = "0.1.0" } diff --git a/crates/grpcio/README.md b/crates/grpcio/README.md deleted file mode 100644 index 0f02ccb..0000000 --- a/crates/grpcio/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# MobileCoin: grpcio protobufs services - -[![Project Chat][chat-image]][chat-link]![License][license-image]![Target][target-image][![Crates.io][crate-image]][crate-link][![Docs Status][docs-image]][docs-link][![Dependency Status][deps-image]][deps-link] - -[grpcio](https://docs.rs/grpcio/latest/grpcio/) implementation of protobufs services. - -[chat-image]: https://img.shields.io/discord/844353360348971068?style=flat-square -[chat-link]: https://mobilecoin.chat -[license-image]: https://img.shields.io/crates/l/mc-probufs-grpcio?style=flat-square -[target-image]: https://img.shields.io/badge/target-x86__64-blue?style=flat-square -[crate-image]: https://img.shields.io/crates/v/mc-probufs-grpcio.svg?style=flat-square -[crate-link]: https://crates.io/crates/mc-probufs-grpcio -[docs-image]: https://img.shields.io/docsrs/mc-probufs-grpcio?style=flat-square -[docs-link]: https://docs.rs/crate/mc-probufs-grpcio -[deps-image]: https://deps.rs/crate/mc-probufs-grpcio/0.1.0/status.svg?style=flat-square -[deps-link]: https://deps.rs/crate/mc-probufs-grpcio/0.1.0 diff --git a/crates/messages/README.md b/crates/messages/README.md deleted file mode 100644 index 9bd341c..0000000 --- a/crates/messages/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# MobileCoin: Common protobuf messages - -[![Project Chat][chat-image]][chat-link]![License][license-image]![Target][target-image][![Crates.io][crate-image]][crate-link][![Docs Status][docs-image]][docs-link][![Dependency Status][deps-image]][deps-link] - -Common protobuf messages. [prost](https://docs.rs/prost/latest/prost/) is used for the message format. - -[chat-image]: https://img.shields.io/discord/844353360348971068?style=flat-square -[chat-link]: https://mobilecoin.chat -[license-image]: https://img.shields.io/crates/l/mc-probufs-messages?style=flat-square -[target-image]: https://img.shields.io/badge/target-x86__64-blue?style=flat-square -[crate-image]: https://img.shields.io/crates/v/mc-probufs-messages.svg?style=flat-square -[crate-link]: https://crates.io/crates/mc-probufs-messages -[docs-image]: https://img.shields.io/docsrs/mc-probufs-messages?style=flat-square -[docs-link]: https://docs.rs/crate/mc-probufs-messages -[deps-image]: https://deps.rs/crate/mc-probufs-messages/0.1.0/status.svg?style=flat-square -[deps-link]: https://deps.rs/crate/mc-probufs-messages/0.1.0 diff --git a/crates/tonic/Cargo.toml b/crates/tonic/Cargo.toml deleted file mode 100644 index 17e1bbe..0000000 --- a/crates/tonic/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "mc-probufs-tonic" -version = "0.1.0" -edition = "2021" -authors = ["MobileCoin"] -rust-version = "1.65" -license = "Apache-2.0" -readme = "README.md" -repository = "https://github.com/mobilecoinfoundation/probufs" -description = "Tonic protobufs client and server" -categories = ["api-bindings", "encoding"] -keywords = ["grpc", "protobuf", "rpc"] - -[dependencies] -mc-probufs-messages = { path = "../messages", version = "0.1.0" } diff --git a/crates/tonic/README.md b/crates/tonic/README.md deleted file mode 100644 index b77e9d0..0000000 --- a/crates/tonic/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# MobileCoin: Tonic protobufs services - -[![Project Chat][chat-image]][chat-link]![License][license-image]![Target][target-image][![Crates.io][crate-image]][crate-link][![Docs Status][docs-image]][docs-link][![Dependency Status][deps-image]][deps-link] - -[Tonic](https://docs.rs/tonic/latest/tonic/) implementation of gRPC client - -[chat-image]: https://img.shields.io/discord/844353360348971068?style=flat-square -[chat-link]: https://mobilecoin.chat -[license-image]: https://img.shields.io/crates/l/mc-probufs-tonic?style=flat-square -[target-image]: https://img.shields.io/badge/target-x86__64-blue?style=flat-square -[crate-image]: https://img.shields.io/crates/v/mc-probufs-tonic.svg?style=flat-square -[crate-link]: https://crates.io/crates/mc-probufs-tonic -[docs-image]: https://img.shields.io/docsrs/mc-probufs-tonic?style=flat-square -[docs-link]: https://docs.rs/crate/mc-probufs-tonic -[deps-image]: https://deps.rs/crate/mc-probufs-tonic/0.1.0/status.svg?style=flat-square -[deps-link]: https://deps.rs/crate/mc-probufs-tonic/0.1.0