diff --git a/deny.toml b/deny.toml index 82e692829d8..1ea0bab3d27 100644 --- a/deny.toml +++ b/deny.toml @@ -19,6 +19,7 @@ allow = [ "ISC", "MIT", "OpenSSL", + "Zlib", ] [[licenses.clarify]] diff --git a/examples/Cargo.lock b/examples/Cargo.lock index 15df2ed5280..d2b62f9ee57 100644 --- a/examples/Cargo.lock +++ b/examples/Cargo.lock @@ -69,7 +69,7 @@ dependencies = [ "aggregator_grpc", "assert_matches", "env_logger", - "itertools 0.9.0", + "itertools", "log", "maplit", "oak", @@ -789,15 +789,6 @@ dependencies = [ "libc", ] -[[package]] -name = "itertools" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.9.0" @@ -1121,7 +1112,7 @@ dependencies = [ "futures-util", "http", "hyper", - "itertools 0.9.0", + "itertools", "jsonwebtoken", "lazy_static", "log", @@ -1420,8 +1411,6 @@ dependencies = [ [[package]] name = "prost" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" dependencies = [ "bytes", "prost-derive", @@ -1430,12 +1419,10 @@ dependencies = [ [[package]] name = "prost-build" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" dependencies = [ "bytes", "heck", - "itertools 0.8.2", + "itertools", "log", "multimap", "petgraph", @@ -1448,11 +1435,9 @@ dependencies = [ [[package]] name = "prost-derive" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" dependencies = [ "anyhow", - "itertools 0.8.2", + "itertools", "proc-macro2", "quote", "syn", @@ -1461,8 +1446,6 @@ dependencies = [ [[package]] name = "prost-types" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" dependencies = [ "bytes", "prost", diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 11a883fcb0c..519ab633621 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -51,3 +51,7 @@ trusted_information_retrieval_client = { path = "trusted_information_retrieval/c # Third party. expect = { path = "../third_party/expect" } roughenough = { path = "../third_party/roughenough" } +prost = { path = "../third_party/prost" } +prost-build = { path = "../third_party/prost/prost-build" } +prost-derive = { path = "../third_party/prost/prost-derive" } +prost-types = { path = "../third_party/prost/prost-types" } diff --git a/oak/server/Cargo.lock b/oak/server/Cargo.lock index 05473ef9b43..199d6b23d4b 100644 --- a/oak/server/Cargo.lock +++ b/oak/server/Cargo.lock @@ -465,14 +465,6 @@ dependencies = [ "libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "itertools" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "itertools" version = "0.9.0" @@ -666,9 +658,9 @@ version = "0.1.0" dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "oak_utils 0.1.0", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1", + "prost-build 0.6.1", + "prost-types 0.6.1", ] [[package]] @@ -682,7 +674,7 @@ dependencies = [ "oak_abi 0.1.0", "oak_runtime 0.1.0", "oak_utils 0.1.0", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1", "rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "signal-hook 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "structopt 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -710,9 +702,9 @@ dependencies = [ "oak_abi 0.1.0", "oak_utils 0.1.0", "prometheus 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1", + "prost-build 0.6.1", + "prost-types 0.6.1", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.10.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -734,8 +726,8 @@ dependencies = [ "anyhow 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1", + "prost-build 0.6.1", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tonic-build 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -872,25 +864,23 @@ dependencies = [ [[package]] name = "prost" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-derive 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-derive 0.6.1", ] [[package]] name = "prost-build" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "multimap 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "petgraph 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1", + "prost-types 0.6.1", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "which 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -898,10 +888,9 @@ dependencies = [ [[package]] name = "prost-derive" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "anyhow 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", @@ -910,10 +899,9 @@ dependencies = [ [[package]] name = "prost-types" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1", ] [[package]] @@ -1378,8 +1366,8 @@ dependencies = [ "hyper 0.13.6 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pin-project 0.4.22 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-derive 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1", + "prost-derive 0.6.1", "tokio 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-rustls 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1398,7 +1386,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-build 0.6.1", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1948,7 +1936,6 @@ dependencies = [ "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" "checksum indexmap 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c398b2b113b55809ceb9ee3e753fcbac793f1956663f3c36549c1346015c2afe" "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -"checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" "checksum itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" "checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" "checksum js-sys 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "ce10c23ad2ea25ceca0093bd3192229da4c5b3c0f2de499c1ecac0d98d452177" @@ -1990,10 +1977,6 @@ dependencies = [ "checksum proc-macro-nested 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" "checksum proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" "checksum prometheus 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b0575e258dab62268e7236d7307caa38848acbda7ec7ab87bd9093791e999d20" -"checksum prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" -"checksum prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" -"checksum prost-derive 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" -"checksum prost-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" "checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" "checksum quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" "checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" diff --git a/oak/server/Cargo.toml b/oak/server/Cargo.toml index 1c22d0b1d4a..98a3f03642b 100644 --- a/oak/server/Cargo.toml +++ b/oak/server/Cargo.toml @@ -14,3 +14,7 @@ oak_runtime = { path = "rust/oak_runtime" } oak_utils = { path = "../../oak_utils" } # Third party. roughenough = { path = "../../third_party/roughenough" } +prost = { path = "../../third_party/prost" } +prost-derive = { path = "../../third_party/prost/prost-derive" } +prost-build = { path = "../../third_party/prost/prost-build" } +prost-types = { path = "../../third_party/prost/prost-types" } diff --git a/oak_abi/Cargo.lock b/oak_abi/Cargo.lock index a17f5042876..7fa3fc3d389 100644 --- a/oak_abi/Cargo.lock +++ b/oak_abi/Cargo.lock @@ -67,9 +67,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" dependencies = [ "either", ] @@ -155,8 +155,6 @@ dependencies = [ [[package]] name = "prost" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" dependencies = [ "bytes", "prost-derive", @@ -165,8 +163,6 @@ dependencies = [ [[package]] name = "prost-build" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" dependencies = [ "bytes", "heck", @@ -183,8 +179,6 @@ dependencies = [ [[package]] name = "prost-derive" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" dependencies = [ "anyhow", "itertools", @@ -196,8 +190,6 @@ dependencies = [ [[package]] name = "prost-types" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" dependencies = [ "bytes", "prost", diff --git a/oak_abi/Cargo.toml b/oak_abi/Cargo.toml index 4176f12aef8..8f8ca8f5cfc 100644 --- a/oak_abi/Cargo.toml +++ b/oak_abi/Cargo.toml @@ -15,3 +15,8 @@ prost-types = "*" [build-dependencies] oak_utils = { path = "../oak_utils" } prost-build = "*" + +[patch.crates-io] +prost-build = { path = "../third_party/prost/prost-build" } +prost = { path = "../third_party/prost" } +prost-types = { path = "../third_party/prost/prost-types" } diff --git a/oak_abi/build.rs b/oak_abi/build.rs index 8e24e0ccc26..746b7ab7cd7 100644 --- a/oak_abi/build.rs +++ b/oak_abi/build.rs @@ -14,10 +14,10 @@ // limitations under the License. // +// Keep clippy from complaining about a needless call to `Default::default()`. +#[allow(clippy::needless_update)] fn main() { - // Exclude generation of service code, as it would require a reference to the Oak SDK to - // compile. - oak_utils::compile_protos_without_services( + oak_utils::compile_protos_with_options( &[ "../oak/proto/application.proto", "../oak/proto/grpc_encap.proto", @@ -29,5 +29,11 @@ fn main() { "../third_party/google/rpc/status.proto", ], &[".."], + oak_utils::ProtoOptions { + // Exclude generation of service code, as it would require a reference to the Oak SDK to + // compile. + generate_services: false, + ..Default::default() + }, ); } diff --git a/oak_utils/Cargo.lock b/oak_utils/Cargo.lock index cf62a6751ee..e0439675513 100644 --- a/oak_utils/Cargo.lock +++ b/oak_utils/Cargo.lock @@ -67,9 +67,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" dependencies = [ "either", ] @@ -144,8 +144,6 @@ dependencies = [ [[package]] name = "prost" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" dependencies = [ "bytes", "prost-derive", @@ -154,8 +152,6 @@ dependencies = [ [[package]] name = "prost-build" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" dependencies = [ "bytes", "heck", @@ -172,8 +168,6 @@ dependencies = [ [[package]] name = "prost-derive" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" dependencies = [ "anyhow", "itertools", @@ -185,8 +179,6 @@ dependencies = [ [[package]] name = "prost-types" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" dependencies = [ "bytes", "prost", diff --git a/oak_utils/Cargo.toml b/oak_utils/Cargo.toml index 2046eb7bbf0..acb2de81668 100644 --- a/oak_utils/Cargo.toml +++ b/oak_utils/Cargo.toml @@ -22,3 +22,7 @@ tonic-build = { version = "*", default-features = false, features = [ "prost", "transport" ] } + +[patch.crates-io] +prost-build = { path = "../third_party/prost/prost-build" } +prost = { path = "../third_party/prost" } diff --git a/oak_utils/src/lib.rs b/oak_utils/src/lib.rs index c45c5efcb93..a817a6ae4b7 100644 --- a/oak_utils/src/lib.rs +++ b/oak_utils/src/lib.rs @@ -163,6 +163,25 @@ impl prost_build::ServiceGenerator for OakServiceGenerator { } } +/// Options for generating Protocol buffer Rust types. +pub struct ProtoOptions { + /// Generate Oak-specific service code for inter-node communication. + /// + /// Default: **true**. + /// + /// Generated code depends on the `oak` SDK crate. + pub generate_services: bool, +} + +/// The default option values. +impl Default for ProtoOptions { + fn default() -> ProtoOptions { + ProtoOptions { + generate_services: true, + } + } +} + /// Build Rust code corresponding to a set of protocol buffer message and service definitions, /// emitting generated code to crate's `OUT_DIR`. For gRPC service definitions, this /// function generates Oak-specific code that is suitable for use inside an Oak Node (i.e. *not* @@ -171,22 +190,16 @@ pub fn compile_protos

(inputs: &[P], includes: &[P]) where P: AsRef, { - compile_protos_with(true, inputs, includes); + compile_protos_with_options(inputs, includes, ProtoOptions::default()); } -/// Build Rust code corresponding to a set of protocol buffer messages, skipping any service -/// definitions, emitting generated code to crate's `OUT_DIR`. -pub fn compile_protos_without_services

(inputs: &[P], includes: &[P]) +/// Like `compile_protos`, but allows for configuring options through `ProtoOptions`. +pub fn compile_protos_with_options

(inputs: &[P], includes: &[P], options: ProtoOptions) where P: AsRef, { - compile_protos_with(false, inputs, includes); -} + set_protoc_env_if_unset(); -fn compile_protos_with

(generate_services: bool, inputs: &[P], includes: &[P]) -where - P: AsRef, -{ for input in inputs { // Tell cargo to rerun this build script if the proto file has changed. // https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorerun-if-changedpath @@ -194,7 +207,7 @@ where } let mut prost_config = prost_build::Config::new(); - if generate_services { + if options.generate_services { prost_config.service_generator(Box::new(OakServiceGenerator)); } prost_config @@ -220,6 +233,8 @@ pub fn generate_grpc_code( file_paths: &[&str], options: CodegenOptions, ) -> std::io::Result<()> { + set_protoc_env_if_unset(); + // TODO(#1093): Move all proto generation to a common crate. let proto_path = std::path::Path::new(proto_path); let file_paths: Vec = file_paths @@ -240,3 +255,11 @@ pub fn generate_grpc_code( .build_server(options.build_server) .compile(&file_paths, &[proto_path.to_path_buf()]) } + +fn set_protoc_env_if_unset() { + if std::env::var("PROTOC").is_err() { + // Use the system protoc if no override is set, so prost-build does not try to use the + // bundled one that we remove as part of the vendoring process. + std::env::set_var("PROTOC", "protoc"); + } +} diff --git a/sdk/Cargo.lock b/sdk/Cargo.lock index fb6b00d715d..f342194ec6c 100644 --- a/sdk/Cargo.lock +++ b/sdk/Cargo.lock @@ -53,9 +53,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.35" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89cb5d814ab2a47fd66d3266e9efccb53ca4c740b7451043b8ffcf9a6208f3f8" +checksum = "a265e3abeffdce30b2e26b7a11b222fe37c6067404001b434101457d0385eb92" dependencies = [ "proc-macro2", "quote", @@ -138,9 +138,12 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "bytes" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" +checksum = "118cf036fbb97d0816e3c34b2d7a1e8cfc60f68fcf63d550ddbe9bd5f59c213b" +dependencies = [ + "loom", +] [[package]] name = "cc" @@ -200,9 +203,9 @@ dependencies = [ [[package]] name = "dtoa" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" +checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" [[package]] name = "either" @@ -367,6 +370,19 @@ dependencies = [ "slab", ] +[[package]] +name = "generator" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add72f17bb81521258fcc8a7a3245b1e184e916bfbe34f0ea89558f440df5c68" +dependencies = [ + "cc", + "libc", + "log", + "rustc_version", + "winapi 0.3.8", +] + [[package]] name = "generic-array" version = "0.14.2" @@ -538,18 +554,18 @@ dependencies = [ [[package]] name = "itertools" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" dependencies = [ "either", ] [[package]] name = "itoa" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" [[package]] name = "js-sys" @@ -620,6 +636,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "loom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ecc775857611e1df29abba5c41355cdf540e7e9d4acfdf0f355eefee82330b7" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", +] + [[package]] name = "maplit" version = "1.0.2" @@ -935,18 +962,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e75373ff9037d112bb19bc61333a06a159eaeb217660dcfbea7d88e1db823919" +checksum = "12e3a6cdbfe94a5e4572812a0201f8c0ed98c1c452c7b8563ce2276988ef9c17" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b4b44893d3c370407a1d6a5cfde7c41ae0478e31c516c85f67eb3adc51be6d" +checksum = "6a0ffd45cf79d88737d7cc85bfd5d2894bee1139b356e616fe85dc389c61aaf7" dependencies = [ "proc-macro2", "quote", @@ -1035,8 +1062,6 @@ dependencies = [ [[package]] name = "prost" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" dependencies = [ "bytes", "prost-derive", @@ -1045,8 +1070,6 @@ dependencies = [ [[package]] name = "prost-build" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" dependencies = [ "bytes", "heck", @@ -1063,8 +1086,6 @@ dependencies = [ [[package]] name = "prost-derive" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" dependencies = [ "anyhow", "itertools", @@ -1076,8 +1097,6 @@ dependencies = [ [[package]] name = "prost-types" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" dependencies = [ "bytes", "prost", @@ -1175,9 +1194,9 @@ checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" [[package]] name = "remove_dir_all" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ "winapi 0.3.8", ] @@ -1219,9 +1238,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.14" +version = "0.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06b3fefa4f12272808f809a0af618501fdaba41a58963c5fb72238ab0be09603" +checksum = "952cd6b98c85bbc30efa1ba5783b8abf12fec8b3287ffa52605b9432313e34e4" dependencies = [ "cc", "libc", @@ -1242,6 +1261,15 @@ dependencies = [ "ring", ] +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver", +] + [[package]] name = "rustls" version = "0.17.0" @@ -1270,6 +1298,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scoped-tls" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" + [[package]] name = "scopeguard" version = "1.1.0" @@ -1286,20 +1320,35 @@ dependencies = [ "untrusted", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + [[package]] name = "serde" -version = "1.0.111" +version = "1.0.112" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9124df5b40cbd380080b2cc6ab894c040a3070d995f5c9dc77e18c34a8ae37d" +checksum = "736aac72d1eafe8e5962d1d1c3d99b0df526015ba40915cb3c49d042e92ec243" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.111" +version = "1.0.112" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2c3ac8e6ca1e9c80b8be1023940162bf81ae3cffbb1809474152f2ce1eb250" +checksum = "bf0343ce212ac0d3d6afd9391ac8e9c9efe06b533c8d33f660f6390cc4093f57" dependencies = [ "proc-macro2", "quote", @@ -1308,9 +1357,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.53" +version = "1.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993948e75b189211a9b31a7528f950c6adc21f9720b6438ff80a7fa2f864cea2" +checksum = "ec2c5d7e739bc07a3e73381a39d61fdb5f671c60c1df26a130690665803d8226" dependencies = [ "itoa", "ryu", @@ -1436,9 +1485,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93a56fabc59dce20fe48b6c832cc249c713e7ed88fa28b0ee0a3bfcaae5fe4e2" +checksum = "b5304cfdf27365b7585c25d4af91b35016ed21ef88f17ced89c7093b43dba8b6" dependencies = [ "proc-macro2", "quote", @@ -1527,6 +1576,12 @@ dependencies = [ "winapi 0.3.8", ] +[[package]] +name = "tinyvec" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" + [[package]] name = "tokio" version = "0.2.21" @@ -1886,11 +1941,11 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" +checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" dependencies = [ - "smallvec", + "tinyvec", ] [[package]] diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index 82472a0dc0c..3f46a857be9 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -16,3 +16,7 @@ oak_tests = { path = "rust/oak_tests" } oak_utils = { path = "../oak_utils" } # Third party. roughenough = { path = "../third_party/roughenough" } +prost = { path = "../third_party/prost" } +prost-build = { path = "../third_party/prost/prost-build" } +prost-derive = { path = "../third_party/prost/prost-derive" } +prost-types = { path = "../third_party/prost/prost-types" }