Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add empty rust crates for protobufs #4

Merged
merged 3 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Generated by Cargo
# will have compiled files and executables
/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
31 changes: 31 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[workspace]
members = [
"mobilecoinfoundation/attestation/grpcio",
"mobilecoinfoundation/attestation/tonic",
"mobilecoinfoundation/attestation/messages",
]

# 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"

[workspace.metadata.release]
shared-version = true
dev-version-ext = "beta.0"
consolidate-commits = true
consolidate-pushes = true
tag-name = "v{{version}}"

# The file names in this key are relative to the each crate that gets released.
# So we only need one `README.md` entry if all the README's follow a
# common format and are always next to the Cargo.toml for their respective
# package.
pre-release-replacements = [
{file="README.md", search="mc-[a-z-]+/[0-9.]+", replace="{{crate_name}}/{{version}}"},
]
55 changes: 55 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
targets = []

[advisories]
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]
vulnerability = "deny"
unmaintained = "warn"
yanked = "warn"
notice = "warn"
ignore = []

[licenses]
unlicensed = "deny"
allow = [
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"BSD-3-Clause",
"ISC",
"MIT",
"Unicode-DFS-2016",
]
deny = []
copyleft = "deny"
allow-osi-fsf-free = "neither"
default = "deny"
confidence-threshold = 0.8
exceptions = []

[bans]
multiple-versions = "warn"
# Lint level for when a crate version requirement is `*`
wildcards = "deny"
highlight = "all"
allow = []
deny = [
# https://github.com/briansmith/ring/issues/774
{ name = "ring" },
]
skip = [
# Workaround for path only dependencies,
# https://github.com/EmbarkStudios/cargo-deny/issues/241
# { name = "some/dev/only/path" },
]
skip-tree = [ ]

[sources]
unknown-registry = "warn"
unknown-git = "warn"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = []

[sources.allow-org]
github = []
gitlab = []
bitbucket = []
15 changes: 15 additions & 0 deletions mobilecoinfoundation/attestation/grpcio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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-messages = { path = "../messages", version = "0.1.0" }
22 changes: 22 additions & 0 deletions mobilecoinfoundation/attestation/grpcio/README.md
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions mobilecoinfoundation/attestation/grpcio/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) 2023 The MobileCoin Foundation

#![doc = include_str!("../README.md")]
#![deny(missing_docs, missing_debug_implementations, unsafe_code)]

#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}
14 changes: 14 additions & 0 deletions mobilecoinfoundation/attestation/messages/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "mc-attestation-messages"
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 = "Common grpc messages"
categories = ["encoding"]
keywords = ["protobuf"]

[dependencies]
22 changes: 22 additions & 0 deletions mobilecoinfoundation/attestation/messages/README.md
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions mobilecoinfoundation/attestation/messages/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) 2023 The MobileCoin Foundation

#![doc = include_str!("../README.md")]
#![deny(missing_docs, missing_debug_implementations, unsafe_code)]

#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}
15 changes: 15 additions & 0 deletions mobilecoinfoundation/attestation/tonic/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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-messages = { path = "../messages", version = "0.1.0" }
22 changes: 22 additions & 0 deletions mobilecoinfoundation/attestation/tonic/README.md
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions mobilecoinfoundation/attestation/tonic/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) 2023 The MobileCoin Foundation

#![doc = include_str!("../README.md")]
#![deny(missing_docs, missing_debug_implementations, unsafe_code)]

#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}
3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "stable"
components = [ "clippy", "rustfmt" ]
1 change: 1 addition & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
edition = "2021"