From 84b09af23307752164082c07d1e1c7146eaecc52 Mon Sep 17 00:00:00 2001 From: Tiziano Santoro Date: Tue, 18 Aug 2020 16:55:23 +0100 Subject: [PATCH] Move oak_runtime and oak_loader crates Make them top-level crates, and fix imports transitively This is more in line with standard Rust conventions, and also makes the code more organized and easier to navigate. Move proto folder to top level too. Use more explicit dependencies between local crates (using `path`). --- .github/workflows/upload_coverage.yaml | 2 +- docs/programming-oak.md | 2 +- docs/sdk.md | 3 +- examples/Cargo.toml | 2 +- .../aggregator/scripts/docker_build_and_push | 2 +- examples/aggregator/scripts/run_server | 2 +- examples/authentication/README.md | 2 +- examples/authentication/client/build.rs | 2 +- examples/chat/proto/BUILD | 2 +- examples/chat/proto/chat.proto | 2 +- .../google/oak/hello_world/MainActivity.java | 4 +- examples/hello_world/client/nodejs/index.js | 36 +- examples/hello_world/module/cpp/BUILD | 2 +- examples/injection/proto/BUILD | 2 +- examples/injection/proto/injection.proto | 2 +- examples/tensorflow/module/cpp/BUILD | 4 +- examples/translator/client/translator.go | 2 +- oak/common/label.cc | 2 +- oak/module/oak_main.h | 2 +- oak/server/Cargo.toml | 22 - oak_abi/Cargo.toml | 9 +- oak_io/Cargo.lock | 12 +- oak_io/Cargo.toml | 6 + {oak/server => oak_loader}/.dockerignore | 0 {oak/server => oak_loader}/Cargo.lock | 26 - .../rust/oak_loader => oak_loader}/Cargo.toml | 14 +- {oak/server => oak_loader}/Dockerfile | 0 {oak/server => oak_loader}/deny.toml | 0 .../src/certs/README.md | 0 .../src/certs/roots.pem | 0 .../oak_loader => oak_loader}/src/main.rs | 2 +- .../oak_loader => oak_loader}/src/options.rs | 0 .../oak_loader => oak_loader}/src/tests.rs | 0 oak_runtime/Cargo.lock | 1939 +++++++++++++++++ .../oak_runtime => oak_runtime}/Cargo.toml | 22 +- .../rust/oak_runtime => oak_runtime}/build.rs | 6 +- .../src/auth/mod.rs | 0 .../src/auth/oidc_utils.rs | 0 .../src/channel.rs | 0 .../oak_runtime => oak_runtime}/src/config.rs | 0 .../oak_runtime => oak_runtime}/src/graph.rs | 0 .../src/introspect.rs | 0 .../src/introspection_events.rs | 0 .../oak_runtime => oak_runtime}/src/io.rs | 0 .../oak_runtime => oak_runtime}/src/lib.rs | 0 .../src/message.rs | 0 .../src/metrics/mod.rs | 0 .../src/metrics/server.rs | 0 .../src/node/grpc/client.rs | 0 .../src/node/grpc/codec.rs | 0 .../src/node/grpc/invocation.rs | 0 .../src/node/grpc/mod.rs | 0 .../src/node/grpc/server/auth/mod.rs | 0 .../src/node/grpc/server/auth/oidc_service.rs | 0 .../src/node/grpc/server/mod.rs | 0 .../src/node/http/mod.rs | 0 .../src/node/http/tests.rs | 0 .../src/node/logger.rs | 0 .../src/node/mod.rs | 0 .../src/node/roughtime.rs | 0 .../src/node/storage.rs | 0 .../src/node/wasm/mod.rs | 2 +- .../src/node/wasm/tests.rs | 0 .../src/permissions.rs | 0 .../src/proto/mod.rs | 0 .../oak_runtime => oak_runtime}/src/proxy.rs | 0 .../oak_runtime => oak_runtime}/src/tests.rs | 0 .../src/time/mod.rs | 0 .../src/time/tests.rs | 0 .../tests/integration_test.rs | 0 oak_services/Cargo.toml | 9 +- oak_utils/Cargo.toml | 14 +- {oak/proto => proto}/BUILD | 0 {oak/proto => proto}/authentication.proto | 0 {oak/proto => proto}/handle.proto | 0 .../introspection_events.proto | 0 runner/src/main.rs | 12 +- scripts/build_gh_pages | 6 +- scripts/build_reproducibility_index | 2 +- scripts/common | 13 +- scripts/generate_root_ca_certs | 2 +- scripts/run_cargo_crev | 2 +- scripts/run_tests_coverage | 2 +- sdk/Cargo.toml | 2 +- sdk/rust/oak/build.rs | 4 +- sdk/rust/oak_app_build/src/main.rs | 2 +- {oak/server/testdata => testdata}/empty.wat | 0 {oak/server/testdata => testdata}/minimal.wat | 0 {oak/server/testdata => testdata}/missing.wat | 0 {oak/server/testdata => testdata}/wrong.wat | 0 90 files changed, 2059 insertions(+), 148 deletions(-) delete mode 100644 oak/server/Cargo.toml rename {oak/server => oak_loader}/.dockerignore (100%) rename {oak/server => oak_loader}/Cargo.lock (98%) rename {oak/server/rust/oak_loader => oak_loader}/Cargo.toml (53%) rename {oak/server => oak_loader}/Dockerfile (100%) rename {oak/server => oak_loader}/deny.toml (100%) rename {oak/server/rust/oak_loader => oak_loader}/src/certs/README.md (100%) rename {oak/server/rust/oak_loader => oak_loader}/src/certs/roots.pem (100%) rename {oak/server/rust/oak_loader => oak_loader}/src/main.rs (97%) rename {oak/server/rust/oak_loader => oak_loader}/src/options.rs (100%) rename {oak/server/rust/oak_loader => oak_loader}/src/tests.rs (100%) create mode 100644 oak_runtime/Cargo.lock rename {oak/server/rust/oak_runtime => oak_runtime}/Cargo.toml (64%) rename {oak/server/rust/oak_runtime => oak_runtime}/build.rs (90%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/auth/mod.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/auth/oidc_utils.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/channel.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/config.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/graph.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/introspect.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/introspection_events.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/io.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/lib.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/message.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/metrics/mod.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/metrics/server.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/grpc/client.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/grpc/codec.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/grpc/invocation.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/grpc/mod.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/grpc/server/auth/mod.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/grpc/server/auth/oidc_service.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/grpc/server/mod.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/http/mod.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/http/tests.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/logger.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/mod.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/roughtime.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/storage.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/wasm/mod.rs (99%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/node/wasm/tests.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/permissions.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/proto/mod.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/proxy.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/tests.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/time/mod.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/src/time/tests.rs (100%) rename {oak/server/rust/oak_runtime => oak_runtime}/tests/integration_test.rs (100%) rename {oak/proto => proto}/BUILD (100%) rename {oak/proto => proto}/authentication.proto (100%) rename {oak/proto => proto}/handle.proto (100%) rename {oak/proto => proto}/introspection_events.proto (100%) rename {oak/server/testdata => testdata}/empty.wat (100%) rename {oak/server/testdata => testdata}/minimal.wat (100%) rename {oak/server/testdata => testdata}/missing.wat (100%) rename {oak/server/testdata => testdata}/wrong.wat (100%) diff --git a/.github/workflows/upload_coverage.yaml b/.github/workflows/upload_coverage.yaml index fbd17668a5a..968a262ffdf 100644 --- a/.github/workflows/upload_coverage.yaml +++ b/.github/workflows/upload_coverage.yaml @@ -35,4 +35,4 @@ jobs: - name: Upload to codecov.io run: | - bash <(curl -s https://codecov.io/bash) -f ./oak/server/target/debug/lcov.info + bash <(curl -s https://codecov.io/bash) -f ./oak_loader/target/debug/lcov.info diff --git a/docs/programming-oak.md b/docs/programming-oak.md index 2dc944bd693..ace5867fac9 100644 --- a/docs/programming-oak.md +++ b/docs/programming-oak.md @@ -292,7 +292,7 @@ the following script: The Oak Application is then started using the Oak Loader: ```bash -./oak/server/target/x86_64-unknown-linux-musl/release/oak_loader --application=./examples/hello_world/bin/hello_world.oak +./oak_loader/target/x86_64-unknown-linux-musl/release/oak_loader --application=./examples/hello_world/bin/hello_world.oak ``` The Oak Loader will launch an [Oak Runtime](concepts.md#oak-runtime), and this diff --git a/docs/sdk.md b/docs/sdk.md index 0317d27abef..8404b81e5af 100644 --- a/docs/sdk.md +++ b/docs/sdk.md @@ -129,8 +129,7 @@ as a `Duration` since the UNIX epoch. ### `oak::proto` Module -The -[`oak::proto`](https://project-oak.github.io/oak/sdk/doc/oak/proto/index.html) +The [`oak::proto`](https://project-oak.github.io/oak/sdk/doc/proto/index.html) module holds auto-generated submodules for dealing with protocol buffers. ### `oak::logger` Module diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 95997752fe0..72f279412e8 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -40,7 +40,7 @@ oak = { path = "../sdk/rust/oak" } oak_abi = { path = "../oak_abi" } oak_derive = { path = "../sdk/rust/oak_derive" } oak_io = { path = "../oak_io" } -oak_runtime = { path = "../oak/server/rust/oak_runtime" } +oak_runtime = { path = "../oak_runtime" } oak_services = { path = "../oak_services" } oak_tests = { path = "../sdk/rust/oak_tests" } oak_utils = { path = "../oak_utils" } diff --git a/examples/aggregator/scripts/docker_build_and_push b/examples/aggregator/scripts/docker_build_and_push index 3e48e9380ea..31fb07f0445 100755 --- a/examples/aggregator/scripts/docker_build_and_push +++ b/examples/aggregator/scripts/docker_build_and_push @@ -14,7 +14,7 @@ readonly BACKEND_DOCKER_IMAGE_NAME='gcr.io/oak-ci/oak-aggregator-backend' # Build aggregator image # Build the base server. - docker build --tag=oak_docker --file=./oak/server/Dockerfile ./oak/server + docker build --tag=oak_docker --file=./oak_loader/Dockerfile ./oak_loader # Build and save the example docker build --tag=aggregator --file=./examples/Dockerfile "./examples/aggregator" docker tag aggregator "${AGGREGATOR_DOCKER_IMAGE_NAME}":latest diff --git a/examples/aggregator/scripts/run_server b/examples/aggregator/scripts/run_server index 04a3f1d9df4..859486d11c0 100755 --- a/examples/aggregator/scripts/run_server +++ b/examples/aggregator/scripts/run_server @@ -8,7 +8,7 @@ source "${GLOBAL_SCRIPTS_DIR}/common" "${GLOBAL_SCRIPTS_DIR}/build_example" -e aggregator readonly APPLICATION="${PWD}/examples/aggregator/bin/aggregator.oak" -exec cargo run --release --target=x86_64-unknown-linux-musl --manifest-path=oak/server/rust/oak_loader/Cargo.toml -- \ +exec cargo run --release --target=x86_64-unknown-linux-musl --manifest-path=oak_loader/Cargo.toml -- \ --application="${APPLICATION}" \ --grpc-tls-private-key="${GLOBAL_SCRIPTS_DIR}/../examples/certs/local/local.key" \ --grpc-tls-certificate="${GLOBAL_SCRIPTS_DIR}/../examples/certs/local/local.pem" \ diff --git a/examples/authentication/README.md b/examples/authentication/README.md index 1d10adbd295..0662d14fc8d 100644 --- a/examples/authentication/README.md +++ b/examples/authentication/README.md @@ -21,7 +21,7 @@ The Oak server can be run with the OpenID Connect authentication service enabled using the --oidc-client flag: ```bash -cargo run --manifest-path=oak/server/rust/oak_loader/Cargo.toml -- \ +cargo run --manifest-path=oak_loader/Cargo.toml -- \ --application= \ --grpc-tls-private-key= \ --grpc-tls-certificate= \ diff --git a/examples/authentication/client/build.rs b/examples/authentication/client/build.rs index 010fc87e125..0829776ef98 100644 --- a/examples/authentication/client/build.rs +++ b/examples/authentication/client/build.rs @@ -18,7 +18,7 @@ use oak_utils::{generate_grpc_code, CodegenOptions}; fn main() -> Result<(), Box> { generate_grpc_code( - "../../../oak/proto", + "../../../proto", &["authentication.proto"], CodegenOptions { build_client: true, diff --git a/examples/chat/proto/BUILD b/examples/chat/proto/BUILD index 4816dcdffb2..48d77595abb 100644 --- a/examples/chat/proto/BUILD +++ b/examples/chat/proto/BUILD @@ -27,8 +27,8 @@ proto_library( name = "chat_proto", srcs = ["chat.proto"], deps = [ - "//oak/proto:handle_proto", "//oak_services/proto:grpc_encap_proto", + "//proto:handle_proto", "@com_google_protobuf//:empty_proto", ], ) diff --git a/examples/chat/proto/chat.proto b/examples/chat/proto/chat.proto index 875efdb3c69..b411cef9230 100644 --- a/examples/chat/proto/chat.proto +++ b/examples/chat/proto/chat.proto @@ -19,7 +19,7 @@ syntax = "proto3"; package oak.examples.chat; import "google/protobuf/empty.proto"; -import "oak/proto/handle.proto"; +import "proto/handle.proto"; import "oak_services/proto/grpc_encap.proto"; message CreateRoomRequest { diff --git a/examples/hello_world/client/android/java/com/google/oak/hello_world/MainActivity.java b/examples/hello_world/client/android/java/com/google/oak/hello_world/MainActivity.java index 081ee362a8a..c3acd766410 100644 --- a/examples/hello_world/client/android/java/com/google/oak/hello_world/MainActivity.java +++ b/examples/hello_world/client/android/java/com/google/oak/hello_world/MainActivity.java @@ -44,9 +44,9 @@ /** Main activity for the Oak Android "Hello, World" app. */ public class MainActivity extends Activity { - // Keep in sync with /oak/server/rust/oak_runtime/src/node/grpc/server/mod.rs. + // Keep in sync with /oak_runtime/src/node/grpc/server/mod.rs. private static final String OAK_LABEL_GRPC_METADATA_KEY = "x-oak-label-bin"; - + private HandlerThread backgroundHandlerThread; private Handler backgroundHandler; diff --git a/examples/hello_world/client/nodejs/index.js b/examples/hello_world/client/nodejs/index.js index b629c93bea0..181d2048645 100644 --- a/examples/hello_world/client/nodejs/index.js +++ b/examples/hello_world/client/nodejs/index.js @@ -23,7 +23,7 @@ const CERT_PATH = __dirname + '/../../../certs/local/ca.pem'; const SERVICE_PROTO_PATH = __dirname + '/../../proto/hello_world.proto'; const OAK_LABEL_PROTO_PATH = __dirname + '/../../../../oak_abi/proto/label.proto'; -// Keep in sync with /oak/server/rust/oak_runtime/src/node/grpc/server/mod.rs. +// Keep in sync with /oak_runtime/src/node/grpc/server/mod.rs. const oakLabelGrpcMetadataKey = 'x-oak-label-bin'; async function main() { @@ -52,8 +52,7 @@ async function main() { return metaData; } - const helloWorldProto = grpc.loadPackageDefinition(helloWorldDefinition).oak - .examples.hello_world; + const helloWorldProto = grpc.loadPackageDefinition(helloWorldDefinition).oak.examples.hello_world; const credentials = grpc.credentials.createSsl(fs.readFileSync(CERT_PATH)); const client = new helloWorldProto.HelloWorld('localhost:8080', credentials); @@ -61,22 +60,21 @@ async function main() { // For documentation on client calls see the `@grpc/grpc-js` documentation: // https://grpc.github.io/grpc/node/grpc.Client.html#~CallProperties client.sayHello( - // The arguments passed to the gRPC service. Corresponds to the - // `HelloRequest` message type in hello_world.proto file. - { greeting: 'Node.js' }, - // The metadata for this gRPC call. - getGrpcMetadata(), - // Callback invoked with the response. - (error, response) => { - if (error) { - console.error(error); - process.exit(1); - } else { - console.log(response.reply); - process.exit(0); - } - } - ); + // The arguments passed to the gRPC service. Corresponds to the + // `HelloRequest` message type in hello_world.proto file. + {greeting: 'Node.js'}, + // The metadata for this gRPC call. + getGrpcMetadata(), + // Callback invoked with the response. + (error, response) => { + if (error) { + console.error(error); + process.exit(1); + } else { + console.log(response.reply); + process.exit(0); + } + }); } main(); diff --git a/examples/hello_world/module/cpp/BUILD b/examples/hello_world/module/cpp/BUILD index 1df7d608409..e050657add3 100644 --- a/examples/hello_world/module/cpp/BUILD +++ b/examples/hello_world/module/cpp/BUILD @@ -28,6 +28,6 @@ cc_binary( "//oak/module:oak_abi", "//oak/module:oak_main", # TODO(#422): Sort out inclusion of protobuf files - # "//oak/proto:oak_api_cc_proto", + # "//proto:oak_api_cc_proto", ], ) diff --git a/examples/injection/proto/BUILD b/examples/injection/proto/BUILD index a146f7f35d8..76872b773c9 100644 --- a/examples/injection/proto/BUILD +++ b/examples/injection/proto/BUILD @@ -27,7 +27,7 @@ proto_library( name = "injection_proto", srcs = ["injection.proto"], deps = [ - "//oak/proto:handle_proto", + "//proto:handle_proto", "@com_google_protobuf//:empty_proto", ], ) diff --git a/examples/injection/proto/injection.proto b/examples/injection/proto/injection.proto index 4b738554085..27a84819885 100644 --- a/examples/injection/proto/injection.proto +++ b/examples/injection/proto/injection.proto @@ -16,7 +16,7 @@ syntax = "proto3"; -import "oak/proto/handle.proto"; +import "proto/handle.proto"; package oak.examples.injection; diff --git a/examples/tensorflow/module/cpp/BUILD b/examples/tensorflow/module/cpp/BUILD index 01e3abc52e0..aef0a455f3c 100644 --- a/examples/tensorflow/module/cpp/BUILD +++ b/examples/tensorflow/module/cpp/BUILD @@ -48,7 +48,7 @@ cc_binary( "//oak/module:oak_main", "//oak/module:placeholders", # TODO(#422): Sort out inclusion of protobuf files - # "//oak/proto:oak_api_cc_proto", + # "//proto:oak_api_cc_proto", "@org_tensorflow//tensorflow/lite:framework", "@org_tensorflow//tensorflow/lite/kernels:builtin_ops", ], @@ -82,7 +82,7 @@ cc_binary( "//oak/module:oak_main", "//oak/module:placeholders", # TODO(#422): Sort out inclusion of protobuf files - # "//oak/proto:oak_api_cc_proto", + # "//proto:oak_api_cc_proto", "@org_tensorflow//tensorflow/lite/micro:micro_framework", "@org_tensorflow//tensorflow/lite/micro/kernels:all_ops_resolver", ], diff --git a/examples/translator/client/translator.go b/examples/translator/client/translator.go index e5250694449..1e17f83e900 100644 --- a/examples/translator/client/translator.go +++ b/examples/translator/client/translator.go @@ -35,7 +35,7 @@ var ( caCert = flag.String("ca_cert", "", "Path to the PEM-encoded CA root certificate") ) -// Keep in sync with /oak/server/rust/oak_runtime/src/node/grpc/server/mod.rs. +// Keep in sync with /oak_runtime/src/node/grpc/server/mod.rs. const oakLabelGrpcMetadataKey = "x-oak-label-bin" func translate(ctx context.Context, client translator_pb.TranslatorClient, text, fromLang, toLang string) { diff --git a/oak/common/label.cc b/oak/common/label.cc index 96443e6ffc9..ffa360cfdc7 100644 --- a/oak/common/label.cc +++ b/oak/common/label.cc @@ -24,7 +24,7 @@ namespace oak { // // See https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md. // -// Keep in sync with /oak/server/rust/oak_runtime/src/node/grpc/server/mod.rs. +// Keep in sync with /oak_runtime/src/node/grpc/server/mod.rs. const char kOakLabelGrpcMetadataKey[] = "x-oak-label-bin"; // The `-bin` suffix allows sending binary data for this metadata key. diff --git a/oak/module/oak_main.h b/oak/module/oak_main.h index 1f379b1a3d0..a3d5c58fdb2 100644 --- a/oak/module/oak_main.h +++ b/oak/module/oak_main.h @@ -28,7 +28,7 @@ extern "C" void process_invocation(const uint8_t* req_buf, uint32_t req_size, oak_abi::Handle rsp_handle); // TODO(#422): Sort out inclusion of protobuf files -// #include "oak/proto/oak_api.pb.h" +// #include "proto/oak_api.pb.h" // Placeholder main entrypoint for C++ Oak Modules that have simple unary // method semantics. The Oak Module needs to provide an implementation diff --git a/oak/server/Cargo.toml b/oak/server/Cargo.toml deleted file mode 100644 index 80dab547fc6..00000000000 --- a/oak/server/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[workspace] -members = ["rust/oak_loader", "rust/oak_runtime"] - -# Patch dependencies on oak crates so that they refer to the versions within this same repository. -# -# From https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html : -# > Cargo doesn’t assume that crates in a workspace will depend on each other, so we need to be -# > explicit about the dependency relationships between the crates. -[patch.crates-io] -# Oak. -oak_abi = { path = "../../oak_abi" } -oak_io = { path = "../../oak_io" } -oak_loader = { path = "rust/oak_loader" } -oak_runtime = { path = "rust/oak_runtime" } -oak_services = { path = "../../oak_services" } -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.toml b/oak_abi/Cargo.toml index 8f8ca8f5cfc..27a60a54e26 100644 --- a/oak_abi/Cargo.toml +++ b/oak_abi/Cargo.toml @@ -9,14 +9,15 @@ license = "Apache-2.0" [dependencies] log = "*" -prost = "*" -prost-types = "*" +prost = { path = "../third_party/prost" } +prost-types = { path = "../third_party/prost/prost-types" } [build-dependencies] oak_utils = { path = "../oak_utils" } -prost-build = "*" +prost-build = { path = "../third_party/prost/prost-build" } [patch.crates-io] -prost-build = { path = "../third_party/prost/prost-build" } 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_io/Cargo.lock b/oak_io/Cargo.lock index cac1207689e..1b9b95b0a89 100644 --- a/oak_io/Cargo.lock +++ b/oak_io/Cargo.lock @@ -77,9 +77,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", ] @@ -172,8 +172,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", @@ -182,8 +180,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", @@ -200,8 +196,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", @@ -213,8 +207,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_io/Cargo.toml b/oak_io/Cargo.toml index e6aad702cd5..3dd51d7eca8 100644 --- a/oak_io/Cargo.toml +++ b/oak_io/Cargo.toml @@ -9,3 +9,9 @@ license = "Apache-2.0" [dependencies] oak_abi = { path = "../oak_abi" } + +[patch.crates-io] +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/.dockerignore b/oak_loader/.dockerignore similarity index 100% rename from oak/server/.dockerignore rename to oak_loader/.dockerignore diff --git a/oak/server/Cargo.lock b/oak_loader/Cargo.lock similarity index 98% rename from oak/server/Cargo.lock rename to oak_loader/Cargo.lock index 11b4d7b63d5..35d2db3d0db 100644 --- a/oak/server/Cargo.lock +++ b/oak_loader/Cargo.lock @@ -513,11 +513,6 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "leb128" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "libc" version = "0.2.71" @@ -696,7 +691,6 @@ dependencies = [ "base64 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -726,7 +720,6 @@ dependencies = [ "tokio 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "tonic 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wat 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1798,22 +1791,6 @@ dependencies = [ "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "wast" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "leb128 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "wat" -version = "1.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "wast 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "web-sys" version = "0.3.40" @@ -1965,7 +1942,6 @@ dependencies = [ "checksum jsonwebtoken 7.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b1f325ae57ddcf609f02d891486ce740f5bbd0cc3e93f9bffaacdf6594b21404" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum leb128 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" "checksum libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)" = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" "checksum libm 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" @@ -2088,8 +2064,6 @@ dependencies = [ "checksum wasm-bindgen-shared 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ba19973a58daf4db6f352eda73dc0e289493cd29fb2632eb172085b6521acd" "checksum wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" "checksum wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" -"checksum wast 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "01b1f23531740a81f9300bd2febd397a95c76bfa4aa4bfaf4ca8b1ee3438f337" -"checksum wat 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "4006d418d59293172aebfeeadb7673459dc151874a79135946ea7996b6a98515" "checksum web-sys 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "7b72fe77fd39e4bd3eaa4412fd299a0be6b3dfe9d2597e2f1c20beb968f41d17" "checksum webpki 0.21.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ab146130f5f790d45f82aeeb09e55a256573373ec64409fc19a6fb82fb1032ae" "checksum webpki-roots 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8eff4b7516a57307f9349c64bf34caa34b940b66fed4b2fb3136cb7386e5739" diff --git a/oak/server/rust/oak_loader/Cargo.toml b/oak_loader/Cargo.toml similarity index 53% rename from oak/server/rust/oak_loader/Cargo.toml rename to oak_loader/Cargo.toml index 1f75e29fe84..98d44ba969d 100644 --- a/oak/server/rust/oak_loader/Cargo.toml +++ b/oak_loader/Cargo.toml @@ -16,10 +16,10 @@ default = ["oak_debug"] anyhow = "*" env_logger = "*" log = "*" -oak_abi = "=0.1.0" -oak_runtime = "=0.1.0" -oak_utils = "=0.1.0" -prost = "*" +oak_abi = { path = "../oak_abi" } +oak_runtime = { path = "../oak_runtime" } +oak_utils = { path = "../oak_utils" } +prost = { path = "../third_party/prost" } rustls = "*" serde = { version = "*", features = ["derive"] } signal-hook = "*" @@ -28,3 +28,9 @@ tonic = { version = "*", features = ["tls"] } [dev-dependencies] maplit = "*" + +[patch.crates-io] +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/server/Dockerfile b/oak_loader/Dockerfile similarity index 100% rename from oak/server/Dockerfile rename to oak_loader/Dockerfile diff --git a/oak/server/deny.toml b/oak_loader/deny.toml similarity index 100% rename from oak/server/deny.toml rename to oak_loader/deny.toml diff --git a/oak/server/rust/oak_loader/src/certs/README.md b/oak_loader/src/certs/README.md similarity index 100% rename from oak/server/rust/oak_loader/src/certs/README.md rename to oak_loader/src/certs/README.md diff --git a/oak/server/rust/oak_loader/src/certs/roots.pem b/oak_loader/src/certs/roots.pem similarity index 100% rename from oak/server/rust/oak_loader/src/certs/roots.pem rename to oak_loader/src/certs/roots.pem diff --git a/oak/server/rust/oak_loader/src/main.rs b/oak_loader/src/main.rs similarity index 97% rename from oak/server/rust/oak_loader/src/main.rs rename to oak_loader/src/main.rs index fd79bf3527a..ea554defaf5 100644 --- a/oak/server/rust/oak_loader/src/main.rs +++ b/oak_loader/src/main.rs @@ -19,7 +19,7 @@ //! Invoke with: //! //! ```shell -//! cargo run --manifest-path=oak/server/rust/oak_loader/Cargo.toml -- \ +//! cargo run --manifest-path=oak_loader/Cargo.toml -- \ //! --application= \ //! --grpc-tls-private-key= \ //! --grpc-tls-certificate= \ diff --git a/oak/server/rust/oak_loader/src/options.rs b/oak_loader/src/options.rs similarity index 100% rename from oak/server/rust/oak_loader/src/options.rs rename to oak_loader/src/options.rs diff --git a/oak/server/rust/oak_loader/src/tests.rs b/oak_loader/src/tests.rs similarity index 100% rename from oak/server/rust/oak_loader/src/tests.rs rename to oak_loader/src/tests.rs diff --git a/oak_runtime/Cargo.lock b/oak_runtime/Cargo.lock new file mode 100644 index 00000000000..b4d4ca4b2cd --- /dev/null +++ b/oak_runtime/Cargo.lock @@ -0,0 +1,1939 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "aho-corasick" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" +dependencies = [ + "memchr", +] + +[[package]] +name = "anyhow" +version = "1.0.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b602bfe940d21c130f3895acd65221e8a61270debe89d628b9cb4e3ccb8569b" + +[[package]] +name = "async-stream" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22068c0c19514942eefcfd4daf8976ef1aad84e61539f95cd200c35202f80af5" +dependencies = [ + "async-stream-impl", + "futures-core", +] + +[[package]] +name = "async-stream-impl" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25f9db3b38af870bf7e5cc649167533b493928e50744e2c30ae350230b414670" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-trait" +version = "0.1.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1a4a2f97ce50c9d0282c1468816208588441492b40d813b2e0419c22c05e7f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" + +[[package]] +name = "byteorder" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" + +[[package]] +name = "bytes" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" + +[[package]] +name = "cc" +version = "1.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "chrono" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942f72db697d8767c22d46a598e01f2d3b475501ea43d0db4f16d90259182d0b" +dependencies = [ + "num-integer", + "num-traits", + "time", +] + +[[package]] +name = "cpuid-bool" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "dtoa" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" + +[[package]] +name = "either" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" + +[[package]] +name = "encoding_rs" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "env_logger" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "fixedbitset" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + +[[package]] +name = "futures" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" + +[[package]] +name = "futures-executor" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d6bb888be1153d3abeb9006b11b02cf5e9b209fda28693c31ae1e4e012e314" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" + +[[package]] +name = "futures-macro" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" +dependencies = [ + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" + +[[package]] +name = "futures-task" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" +dependencies = [ + "once_cell", +] + +[[package]] +name = "futures-util" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "h2" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" +dependencies = [ + "autocfg", +] + +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" + +[[package]] +name = "http" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "httparse" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" + +[[package]] +name = "humantime" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +dependencies = [ + "quick-error", +] + +[[package]] +name = "hyper" +version = "0.13.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project", + "socket2", + "time", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" +dependencies = [ + "bytes", + "futures-util", + "hyper", + "log", + "rustls", + "tokio", + "tokio-rustls", + "webpki", +] + +[[package]] +name = "idna" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b45e59b16c76b11bf9738fd5d38879d3bd28ad292d7b313608becb17ae2df9" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + +[[package]] +name = "ipnet" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" + +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" + +[[package]] +name = "js-sys" +version = "0.3.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85a7e2c92a4804dd459b86c339278d0fe87cf93757fae222c3fa3ae75458bc73" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonwebtoken" +version = "7.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afabcc15e437a6484fc4f12d0fd63068fe457bf93f1c148d3d9649c60b103f32" +dependencies = [ + "base64", + "pem", + "ring", + "serde", + "serde_json", + "simple_asn1", +] + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "leb128" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" + +[[package]] +name = "libc" +version = "0.2.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10" + +[[package]] +name = "libm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" + +[[package]] +name = "log" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + +[[package]] +name = "matches" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" + +[[package]] +name = "memchr" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" + +[[package]] +name = "memory_units" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "mime_guess" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "0.6.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" +dependencies = [ + "cfg-if", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "multimap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce" + +[[package]] +name = "net2" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" +dependencies = [ + "cfg-if", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" +dependencies = [ + "autocfg", +] + +[[package]] +name = "oak_abi" +version = "0.1.0" +dependencies = [ + "log", + "oak_utils", + "prost", + "prost-build", + "prost-types", +] + +[[package]] +name = "oak_io" +version = "0.1.0" +dependencies = [ + "oak_abi", +] + +[[package]] +name = "oak_runtime" +version = "0.1.0" +dependencies = [ + "base64", + "byteorder", + "bytes", + "env_logger", + "futures", + "futures-core", + "futures-util", + "http", + "hyper", + "itertools", + "jsonwebtoken", + "lazy_static", + "log", + "maplit", + "oak_abi", + "oak_io", + "oak_services", + "oak_utils", + "prometheus", + "prost", + "prost-build", + "prost-types", + "rand", + "regex", + "reqwest", + "roughenough", + "rustls", + "serde", + "serde_json", + "sha2", + "tokio", + "tonic", + "wasmi", + "wat", +] + +[[package]] +name = "oak_services" +version = "0.1.0" +dependencies = [ + "log", + "oak_abi", + "oak_io", + "oak_utils", + "prost", + "prost-build", + "prost-types", +] + +[[package]] +name = "oak_utils" +version = "0.1.0" +dependencies = [ + "anyhow", + "maplit", + "proc-macro2", + "prost", + "prost-build", + "quote", + "tempfile", + "tonic-build", + "walkdir", +] + +[[package]] +name = "once_cell" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "parity-wasm" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" + +[[package]] +name = "pem" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59698ea79df9bf77104aefd39cc3ec990cb9693fb59c3b0a70ddf2646fdffb4b" +dependencies = [ + "base64", + "once_cell", + "regex", +] + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "petgraph" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "pin-project" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "ppv-lite86" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" + +[[package]] +name = "proc-macro-hack" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99c605b9a0adc77b7211c6b1f722dcb613d68d66859a44f3d485a6da332b0598" + +[[package]] +name = "proc-macro-nested" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" + +[[package]] +name = "proc-macro2" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "prometheus" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0575e258dab62268e7236d7307caa38848acbda7ec7ab87bd9093791e999d20" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "libc", + "spin", + "thiserror", +] + +[[package]] +name = "prost" +version = "0.6.1" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.6.1" +dependencies = [ + "bytes", + "heck", + "itertools", + "log", + "multimap", + "petgraph", + "prost", + "prost-types", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.6.1" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "prost-types" +version = "0.6.1" +dependencies = [ + "bytes", + "prost", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom", + "libc", + "rand_chacha", + "rand_core", + "rand_hc", + "rand_pcg", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core", +] + +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + +[[package]] +name = "regex" +version = "1.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", +] + +[[package]] +name = "regex-syntax" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "reqwest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12427a5577082c24419c9c417db35cfeb65962efc7675bb6b0d5f1f9d315bfe6" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "lazy_static", + "log", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "rustls", + "serde", + "serde_urlencoded", + "tokio", + "tokio-rustls", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "952cd6b98c85bbc30efa1ba5783b8abf12fec8b3287ffa52605b9432313e34e4" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi 0.3.9", +] + +[[package]] +name = "roughenough" +version = "1.1.8" +dependencies = [ + "base64", + "byteorder", + "hex", + "ring", +] + +[[package]] +name = "rustls" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" +dependencies = [ + "base64", + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "sct" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "serde" +version = "1.0.115" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.115" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" +dependencies = [ + "dtoa", + "itoa", + "serde", + "url", +] + +[[package]] +name = "sha2" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2933378ddfeda7ea26f48c555bdad8bb446bf8a3d17832dc83e380d444cfb8c1" +dependencies = [ + "block-buffer", + "cfg-if", + "cpuid-bool", + "digest", + "opaque-debug", +] + +[[package]] +name = "simple_asn1" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692ca13de57ce0613a363c8c2f1de925adebc81b04c923ac60c5488bb44abe4b" +dependencies = [ + "chrono", + "num-bigint", + "num-traits", +] + +[[package]] +name = "slab" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" + +[[package]] +name = "socket2" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "winapi 0.3.9", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "syn" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e69abc24912995b3038597a7a593be5053eb0fb44f3cc5beec0deb421790c1f4" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "tempfile" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +dependencies = [ + "cfg-if", + "libc", + "rand", + "redox_syscall", + "remove_dir_all", + "winapi 0.3.9", +] + +[[package]] +name = "termcolor" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "time" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +dependencies = [ + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "tinyvec" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" + +[[package]] +name = "tokio" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "iovec", + "lazy_static", + "memchr", + "mio", + "pin-project-lite", + "slab", + "tokio-macros", +] + +[[package]] +name = "tokio-macros" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-rustls" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228139ddd4fea3fa345a29233009635235833e52807af7ea6448ead03890d6a9" +dependencies = [ + "futures-core", + "rustls", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-util" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tonic" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b13b102a19758191af97cff34c6785dffd6610f68de5ab1c4bb8378638e4ef90" +dependencies = [ + "async-stream", + "async-trait", + "base64", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "percent-encoding", + "pin-project", + "prost", + "prost-derive", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-balance", + "tower-load", + "tower-make", + "tower-service", + "tracing", + "tracing-futures", +] + +[[package]] +name = "tonic-build" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daec8b14e55497072204b53d5c0b1eb0a6ad1cd8301d6d4c079d4aeec35b21e9" +dependencies = [ + "proc-macro2", + "prost-build", + "quote", + "syn", +] + +[[package]] +name = "tower" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3169017c090b7a28fce80abaad0ab4f5566423677c9331bb320af7e49cfe62" +dependencies = [ + "futures-core", + "tower-buffer", + "tower-discover", + "tower-layer", + "tower-limit", + "tower-load-shed", + "tower-retry", + "tower-service", + "tower-timeout", + "tower-util", +] + +[[package]] +name = "tower-balance" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a792277613b7052448851efcf98a2c433e6f1d01460832dc60bef676bc275d4c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap", + "pin-project", + "rand", + "slab", + "tokio", + "tower-discover", + "tower-layer", + "tower-load", + "tower-make", + "tower-ready-cache", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-buffer" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4887dc2a65d464c8b9b66e0e4d51c2fd6cf5b3373afc72805b0a60bce00446a" +dependencies = [ + "futures-core", + "pin-project", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-discover" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f6b5000c3c54d269cc695dff28136bb33d08cbf1df2c48129e143ab65bf3c2a" +dependencies = [ + "futures-core", + "pin-project", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a35d656f2638b288b33495d1053ea74c40dc05ec0b92084dd71ca5566c4ed1dc" + +[[package]] +name = "tower-limit" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c3040c5dbed68abffaa0d4517ac1a454cd741044f33ab0eefab6b8d1361404" +dependencies = [ + "futures-core", + "pin-project", + "tokio", + "tower-layer", + "tower-load", + "tower-service", +] + +[[package]] +name = "tower-load" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cc79fc3afd07492b7966d7efa7c6c50f8ed58d768a6075dd7ae6591c5d2017b" +dependencies = [ + "futures-core", + "log", + "pin-project", + "tokio", + "tower-discover", + "tower-service", +] + +[[package]] +name = "tower-load-shed" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f021e23900173dc315feb4b6922510dae3e79c689b74c089112066c11f0ae4e" +dependencies = [ + "futures-core", + "pin-project", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-make" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce50370d644a0364bf4877ffd4f76404156a248d104e2cc234cd391ea5cdc965" +dependencies = [ + "tokio", + "tower-service", +] + +[[package]] +name = "tower-ready-cache" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eabb6620e5481267e2ec832c780b31cad0c15dcb14ed825df5076b26b591e1f" +dependencies = [ + "futures-core", + "futures-util", + "indexmap", + "log", + "tokio", + "tower-service", +] + +[[package]] +name = "tower-retry" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6727956aaa2f8957d4d9232b308fe8e4e65d99db30f42b225646e86c9b6a952" +dependencies = [ + "futures-core", + "pin-project", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-service" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" + +[[package]] +name = "tower-timeout" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "127b8924b357be938823eaaec0608c482d40add25609481027b96198b2e4b31e" +dependencies = [ + "pin-project", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-util" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1093c19826d33807c72511e68f73b4a0469a3f22c2bd5f7d5212178b4b89674" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "tower-service", +] + +[[package]] +name = "tracing" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d79ca061b032d6ce30c660fded31189ca0b9922bf483cd70759f13a2d86786c" +dependencies = [ + "cfg-if", + "log", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db63662723c316b43ca36d833707cc93dff82a02ba3d7e354f342682cc8b3545" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "tracing-futures" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "try-lock" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" + +[[package]] +name = "typenum" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" + +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +dependencies = [ + "matches", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "url" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +dependencies = [ + "idna", + "matches", + "percent-encoding", +] + +[[package]] +name = "version_check" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" + +[[package]] +name = "walkdir" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +dependencies = [ + "same-file", + "winapi 0.3.9", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasm-bindgen" +version = "0.2.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0563a9a4b071746dd5aedbc3a28c6fe9be4586fb3fbadb67c400d4f53c6b16c" +dependencies = [ + "cfg-if", + "serde", + "serde_json", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc71e4c5efa60fb9e74160e89b93353bc24059999c0ae0fb03affc39770310b0" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95f8d235a77f880bcef268d379810ea6c0af2eacfa90b1ad5af731776e0c4699" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97c57cefa5fa80e2ba15641578b44d36e7a64279bc5ed43c6dbaf329457a2ed2" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93b162580e34310e5931c4b792560108b10fd14d64915d7fff8ff00180e70092" + +[[package]] +name = "wasmi" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" +dependencies = [ + "libc", + "libm", + "memory_units", + "num-rational", + "num-traits", + "parity-wasm", + "wasmi-validation", +] + +[[package]] +name = "wasmi-validation" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" +dependencies = [ + "parity-wasm", +] + +[[package]] +name = "wast" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b080a48623c1b15193eac2e28c7b8d0e6b2e1c6c67ed46ddcd86063e78e504" +dependencies = [ + "leb128", +] + +[[package]] +name = "wat" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c350d7431aa486488d28cdf75b57d59c02fab9cde20d93c52424510afe18ecc" +dependencies = [ + "wast", +] + +[[package]] +name = "web-sys" +version = "0.3.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dda38f4e5ca63eda02c059d243aa25b5f35ab98451e518c51612cd0f1bd19a47" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab146130f5f790d45f82aeeb09e55a256573373ec64409fc19a6fb82fb1032ae" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8eff4b7516a57307f9349c64bf34caa34b940b66fed4b2fb3136cb7386e5739" +dependencies = [ + "webpki", +] + +[[package]] +name = "which" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" +dependencies = [ + "libc", +] + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winreg" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] diff --git a/oak/server/rust/oak_runtime/Cargo.toml b/oak_runtime/Cargo.toml similarity index 64% rename from oak/server/rust/oak_runtime/Cargo.toml rename to oak_runtime/Cargo.toml index ea6d1130827..27d21a27108 100644 --- a/oak/server/rust/oak_runtime/Cargo.toml +++ b/oak_runtime/Cargo.toml @@ -27,18 +27,18 @@ jsonwebtoken = "*" lazy_static = "*" log = { version = "*" } maplit = "*" -oak_abi = "=0.1.0" -oak_io = "=0.1.0" -oak_services = "=0.1.0" +oak_abi = { path = "../oak_abi" } +oak_io = { path = "../oak_io" } +oak_services = { path = "../oak_services" } prometheus = { version = "0.8", features = [ "nightly" ], default-features = false } -prost = "*" -prost-types = "*" +prost = { path = "../third_party/prost" } +prost-types = { path = "../third_party/prost/prost-types" } rand = "*" regex = { version = "1", optional = true } reqwest = { version = "*", default-features = false, features = ["rustls-tls"] } -roughenough = "*" +roughenough = { path = "../third_party/roughenough" } rustls = "*" serde = "*" serde_json = "*" @@ -60,5 +60,11 @@ regex = "*" wat = "*" [build-dependencies] -oak_utils = "*" -prost-build = "*" +oak_utils = { path = "../oak_utils" } +prost-build = { path = "../third_party/prost/prost-build" } + +[patch.crates-io] +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/rust/oak_runtime/build.rs b/oak_runtime/build.rs similarity index 90% rename from oak/server/rust/oak_runtime/build.rs rename to oak_runtime/build.rs index e99de969f7d..82a0297f23e 100644 --- a/oak/server/rust/oak_runtime/build.rs +++ b/oak_runtime/build.rs @@ -18,7 +18,7 @@ use oak_utils::{compile_protos_with_options, generate_grpc_code, CodegenOptions, fn main() { generate_grpc_code( - "../../../../oak/proto", + "../proto", &["authentication.proto"], CodegenOptions { build_server: true, @@ -28,8 +28,8 @@ fn main() { .expect("Proto compilation failed."); compile_protos_with_options( - &["../../../../oak/proto/introspection_events.proto"], - &["../../../../oak/proto"], + &["../proto/introspection_events.proto"], + &["../proto"], ProtoOptions { // Exclude generation of HandleVisit auto-derive, as it would // require a reference to the Oak SDK to compile. diff --git a/oak/server/rust/oak_runtime/src/auth/mod.rs b/oak_runtime/src/auth/mod.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/auth/mod.rs rename to oak_runtime/src/auth/mod.rs diff --git a/oak/server/rust/oak_runtime/src/auth/oidc_utils.rs b/oak_runtime/src/auth/oidc_utils.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/auth/oidc_utils.rs rename to oak_runtime/src/auth/oidc_utils.rs diff --git a/oak/server/rust/oak_runtime/src/channel.rs b/oak_runtime/src/channel.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/channel.rs rename to oak_runtime/src/channel.rs diff --git a/oak/server/rust/oak_runtime/src/config.rs b/oak_runtime/src/config.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/config.rs rename to oak_runtime/src/config.rs diff --git a/oak/server/rust/oak_runtime/src/graph.rs b/oak_runtime/src/graph.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/graph.rs rename to oak_runtime/src/graph.rs diff --git a/oak/server/rust/oak_runtime/src/introspect.rs b/oak_runtime/src/introspect.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/introspect.rs rename to oak_runtime/src/introspect.rs diff --git a/oak/server/rust/oak_runtime/src/introspection_events.rs b/oak_runtime/src/introspection_events.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/introspection_events.rs rename to oak_runtime/src/introspection_events.rs diff --git a/oak/server/rust/oak_runtime/src/io.rs b/oak_runtime/src/io.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/io.rs rename to oak_runtime/src/io.rs diff --git a/oak/server/rust/oak_runtime/src/lib.rs b/oak_runtime/src/lib.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/lib.rs rename to oak_runtime/src/lib.rs diff --git a/oak/server/rust/oak_runtime/src/message.rs b/oak_runtime/src/message.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/message.rs rename to oak_runtime/src/message.rs diff --git a/oak/server/rust/oak_runtime/src/metrics/mod.rs b/oak_runtime/src/metrics/mod.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/metrics/mod.rs rename to oak_runtime/src/metrics/mod.rs diff --git a/oak/server/rust/oak_runtime/src/metrics/server.rs b/oak_runtime/src/metrics/server.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/metrics/server.rs rename to oak_runtime/src/metrics/server.rs diff --git a/oak/server/rust/oak_runtime/src/node/grpc/client.rs b/oak_runtime/src/node/grpc/client.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/grpc/client.rs rename to oak_runtime/src/node/grpc/client.rs diff --git a/oak/server/rust/oak_runtime/src/node/grpc/codec.rs b/oak_runtime/src/node/grpc/codec.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/grpc/codec.rs rename to oak_runtime/src/node/grpc/codec.rs diff --git a/oak/server/rust/oak_runtime/src/node/grpc/invocation.rs b/oak_runtime/src/node/grpc/invocation.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/grpc/invocation.rs rename to oak_runtime/src/node/grpc/invocation.rs diff --git a/oak/server/rust/oak_runtime/src/node/grpc/mod.rs b/oak_runtime/src/node/grpc/mod.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/grpc/mod.rs rename to oak_runtime/src/node/grpc/mod.rs diff --git a/oak/server/rust/oak_runtime/src/node/grpc/server/auth/mod.rs b/oak_runtime/src/node/grpc/server/auth/mod.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/grpc/server/auth/mod.rs rename to oak_runtime/src/node/grpc/server/auth/mod.rs diff --git a/oak/server/rust/oak_runtime/src/node/grpc/server/auth/oidc_service.rs b/oak_runtime/src/node/grpc/server/auth/oidc_service.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/grpc/server/auth/oidc_service.rs rename to oak_runtime/src/node/grpc/server/auth/oidc_service.rs diff --git a/oak/server/rust/oak_runtime/src/node/grpc/server/mod.rs b/oak_runtime/src/node/grpc/server/mod.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/grpc/server/mod.rs rename to oak_runtime/src/node/grpc/server/mod.rs diff --git a/oak/server/rust/oak_runtime/src/node/http/mod.rs b/oak_runtime/src/node/http/mod.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/http/mod.rs rename to oak_runtime/src/node/http/mod.rs diff --git a/oak/server/rust/oak_runtime/src/node/http/tests.rs b/oak_runtime/src/node/http/tests.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/http/tests.rs rename to oak_runtime/src/node/http/tests.rs diff --git a/oak/server/rust/oak_runtime/src/node/logger.rs b/oak_runtime/src/node/logger.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/logger.rs rename to oak_runtime/src/node/logger.rs diff --git a/oak/server/rust/oak_runtime/src/node/mod.rs b/oak_runtime/src/node/mod.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/mod.rs rename to oak_runtime/src/node/mod.rs diff --git a/oak/server/rust/oak_runtime/src/node/roughtime.rs b/oak_runtime/src/node/roughtime.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/roughtime.rs rename to oak_runtime/src/node/roughtime.rs diff --git a/oak/server/rust/oak_runtime/src/node/storage.rs b/oak_runtime/src/node/storage.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/storage.rs rename to oak_runtime/src/node/storage.rs diff --git a/oak/server/rust/oak_runtime/src/node/wasm/mod.rs b/oak_runtime/src/node/wasm/mod.rs similarity index 99% rename from oak/server/rust/oak_runtime/src/node/wasm/mod.rs rename to oak_runtime/src/node/wasm/mod.rs index a92fa871e4d..67dcbd58c82 100644 --- a/oak/server/rust/oak_runtime/src/node/wasm/mod.rs +++ b/oak_runtime/src/node/wasm/mod.rs @@ -554,7 +554,7 @@ fn oak_resolve_func( signature: &wasmi::Signature, ) -> Result { // The types in the signatures correspond to the parameters from - // /oak/server/rust/oak_abi/src/lib.rs + // /oak_abi/src/lib.rs let (index, sig) = match field_name { "node_create" => ( NODE_CREATE, diff --git a/oak/server/rust/oak_runtime/src/node/wasm/tests.rs b/oak_runtime/src/node/wasm/tests.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/node/wasm/tests.rs rename to oak_runtime/src/node/wasm/tests.rs diff --git a/oak/server/rust/oak_runtime/src/permissions.rs b/oak_runtime/src/permissions.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/permissions.rs rename to oak_runtime/src/permissions.rs diff --git a/oak/server/rust/oak_runtime/src/proto/mod.rs b/oak_runtime/src/proto/mod.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/proto/mod.rs rename to oak_runtime/src/proto/mod.rs diff --git a/oak/server/rust/oak_runtime/src/proxy.rs b/oak_runtime/src/proxy.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/proxy.rs rename to oak_runtime/src/proxy.rs diff --git a/oak/server/rust/oak_runtime/src/tests.rs b/oak_runtime/src/tests.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/tests.rs rename to oak_runtime/src/tests.rs diff --git a/oak/server/rust/oak_runtime/src/time/mod.rs b/oak_runtime/src/time/mod.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/time/mod.rs rename to oak_runtime/src/time/mod.rs diff --git a/oak/server/rust/oak_runtime/src/time/tests.rs b/oak_runtime/src/time/tests.rs similarity index 100% rename from oak/server/rust/oak_runtime/src/time/tests.rs rename to oak_runtime/src/time/tests.rs diff --git a/oak/server/rust/oak_runtime/tests/integration_test.rs b/oak_runtime/tests/integration_test.rs similarity index 100% rename from oak/server/rust/oak_runtime/tests/integration_test.rs rename to oak_runtime/tests/integration_test.rs diff --git a/oak_services/Cargo.toml b/oak_services/Cargo.toml index 425f13dd8bc..a691678bf58 100644 --- a/oak_services/Cargo.toml +++ b/oak_services/Cargo.toml @@ -9,16 +9,17 @@ license = "Apache-2.0" [dependencies] log = "*" -prost = "*" -prost-types = "*" +prost = { path = "../third_party/prost" } +prost-types = { path = "../third_party/prost/prost-types" } oak_abi = { path = "../oak_abi" } oak_io = { path = "../oak_io" } [build-dependencies] oak_utils = { path = "../oak_utils" } -prost-build = "*" +prost-build = { path = "../third_party/prost/prost-build" } [patch.crates-io] -prost-build = { path = "../third_party/prost/prost-build" } 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_utils/Cargo.toml b/oak_utils/Cargo.toml index acb2de81668..b596a2acb69 100644 --- a/oak_utils/Cargo.toml +++ b/oak_utils/Cargo.toml @@ -10,19 +10,21 @@ license = "Apache-2.0" [dependencies] anyhow = "*" maplit = "*" -prost = "*" -tempfile = "*" -quote = "*" -walkdir = "*" -prost-build = "*" proc-macro2 = "*" +prost = { path = "../third_party/prost" } +prost-build = { path = "../third_party/prost/prost-build" } +quote = "*" +tempfile = "*" # Disable the `rustfmt` feature, as it requires `rustfmt` which may not be supported for custom # toolchains. tonic-build = { version = "*", default-features = false, features = [ "prost", "transport" ] } +walkdir = "*" [patch.crates-io] -prost-build = { path = "../third_party/prost/prost-build" } 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/proto/BUILD b/proto/BUILD similarity index 100% rename from oak/proto/BUILD rename to proto/BUILD diff --git a/oak/proto/authentication.proto b/proto/authentication.proto similarity index 100% rename from oak/proto/authentication.proto rename to proto/authentication.proto diff --git a/oak/proto/handle.proto b/proto/handle.proto similarity index 100% rename from oak/proto/handle.proto rename to proto/handle.proto diff --git a/oak/proto/introspection_events.proto b/proto/introspection_events.proto similarity index 100% rename from oak/proto/introspection_events.proto rename to proto/introspection_events.proto diff --git a/runner/src/main.rs b/runner/src/main.rs index 58aa247f283..3ddec2c0057 100644 --- a/runner/src/main.rs +++ b/runner/src/main.rs @@ -317,7 +317,7 @@ fn build_server(opt: &BuildServer) -> Step { name: "create bin folder".to_string(), command: Cmd::new( "mkdir", - vec!["-p".to_string(), "oak/server/bin".to_string()], + vec!["-p".to_string(), "oak_loader/bin".to_string()], ), }, Step::Single { @@ -343,8 +343,8 @@ fn build_server(opt: &BuildServer) -> Step { "--release".to_string(), ] }, - "--manifest-path=oak/server/rust/oak_loader/Cargo.toml".to_string(), - "--out-dir=oak/server/bin".to_string(), + "--manifest-path=oak_loader/Cargo.toml".to_string(), + "--out-dir=oak_loader/bin".to_string(), // `--out-dir` is unstable and requires `-Zunstable-options`. "-Zunstable-options".to_string(), ...if opt.server_variant == "logless" { @@ -505,7 +505,7 @@ fn run_example_server( application_file: &str, ) -> Box { Cmd::new_with_env( - "oak/server/bin/oak_loader", + "oak_loader/bin/oak_loader", spread![ "--grpc-tls-private-key=./examples/certs/local/local.key".to_string(), "--grpc-tls-certificate=./examples/certs/local/local.pem".to_string(), @@ -719,8 +719,8 @@ fn build_docker(example: &Example) -> Step { &[ "build", "--tag=oak_docker", - "--file=./oak/server/Dockerfile", - "./oak/server", + "--file=./oak_loader/Dockerfile", + "./oak_loader", ], ), }, diff --git a/scripts/build_gh_pages b/scripts/build_gh_pages index b2d3b14da90..9cc89683e7b 100755 --- a/scripts/build_gh_pages +++ b/scripts/build_gh_pages @@ -33,10 +33,10 @@ fi readonly TARGET_ABS_PATH="$(realpath "${TARGET_DIR}")" # All the dirs that we want to generate docs for. -declare -ar SOURCE_PATHS=("oak/server" "oak_abi" "oak_utils" "sdk" "runner") -declare -ar TARGET_SUBDIRS=("oak_runtime" "oak_abi" "oak_utils" "oak" "runner") +declare -ar SOURCE_PATHS=("oak_loader" "oak_runtime" "oak_abi" "oak_utils" "sdk" "runner") +declare -ar TARGET_SUBDIRS=("oak_loader" "oak_runtime" "oak_abi" "oak_utils" "oak" "runner") -# Titles used in the top-level index.html files. +# Titles used in the top-level index.html files. declare -ar PAGE_TITLES=("Runtime" "ABI" "Utils" "SDK" "Runner") readonly LEN=${#SOURCE_PATHS[@]} diff --git a/scripts/build_reproducibility_index b/scripts/build_reproducibility_index index 63b4e5f8718..772e9f87d08 100755 --- a/scripts/build_reproducibility_index +++ b/scripts/build_reproducibility_index @@ -13,7 +13,7 @@ source "$SCRIPTS_DIR/common" # List of artifacts that are expected to be reproducibly built. readonly REPRODUCIBLE_ARTIFACTS=( ./examples/target/wasm32-unknown-unknown/release/*.wasm - ./oak/server/target/x86_64-unknown-linux-musl/release/oak_loader + ./oak_loader/target/x86_64-unknown-linux-musl/release/oak_loader ) # Index file containing hashes of the reproducible artifacts, alongside their file names. diff --git a/scripts/common b/scripts/common index e5c1da6c862..e0ab7d0d1f2 100644 --- a/scripts/common +++ b/scripts/common @@ -15,10 +15,19 @@ readonly DOCKER_IMAGE_NAME='gcr.io/oak-ci/oak' readonly SERVER_DOCKER_IMAGE_NAME='gcr.io/oak-ci/oak-server' readonly CACHE_DIR='bazel-cache' -readonly SERVER_BIN_DIR="${PWD}/oak/server/bin" +readonly SERVER_BIN_DIR="${PWD}/oak_loader/bin" # List all workspaces. -declare -ar ALL_CRATES=("oak_utils" "oak_abi" "oak/server" "sdk" "examples" "runner" "experimental") +declare -ar ALL_CRATES=( + examples + experimental + oak_abi + oak_loader + oak_runtime + oak_utils + runner + sdk +) # To set up remote cache write credentials: # - navigate to https://pantheon.corp.google.com/iam-admin/serviceaccounts?project=oak-ci diff --git a/scripts/generate_root_ca_certs b/scripts/generate_root_ca_certs index e3e767c639a..3172861bc76 100755 --- a/scripts/generate_root_ca_certs +++ b/scripts/generate_root_ca_certs @@ -10,7 +10,7 @@ readonly COMMIT="be85a54767b3559e7bb262e4f1a78e1c5829e478" readonly DOWNLOAD_DIR="${SCRIPTS_DIR}/../downloads" readonly DOWNLOAD_FILE="${DOWNLOAD_DIR}/files.tar.gz" readonly EXTRACT_DIR="${DOWNLOAD_DIR}/files" -readonly TARGET_FILE="${SCRIPTS_DIR}/../oak/server/rust/oak_loader/src/certs/roots.pem" +readonly TARGET_FILE="${SCRIPTS_DIR}/../oak_loader/src/certs/roots.pem" if [[ -d "${DOWNLOAD_DIR}" ]]; then rm --recursive --force "${DOWNLOAD_DIR}" diff --git a/scripts/run_cargo_crev b/scripts/run_cargo_crev index 5856f47cd74..62097ac7d15 100755 --- a/scripts/run_cargo_crev +++ b/scripts/run_cargo_crev @@ -22,7 +22,7 @@ done cargo crev repo fetch all ( - cd ./oak/server + cd ./oak_loader # Ignore status code from the verify command. cargo crev crate verify --show-all || true ) diff --git a/scripts/run_tests_coverage b/scripts/run_tests_coverage index a57b2ef8966..8e37d4b46b9 100755 --- a/scripts/run_tests_coverage +++ b/scripts/run_tests_coverage @@ -9,7 +9,7 @@ source "$SCRIPTS_DIR/common" # Generate coverage summary ( - cd oak/server || exit 1 + cd oak_loader || exit 1 grcov ./target/debug/ \ --source-dir=. \ --llvm \ diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index 7c6a994432a..bd61c6b0279 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -18,7 +18,7 @@ oak_abi = { path = "../oak_abi" } oak_app_build = { path = "rust/oak_app_build" } oak_derive = { path = "rust/oak_derive" } oak_io = { path = "../oak_io" } -oak_runtime = { path = "../oak/server/rust/oak_runtime" } +oak_runtime = { path = "../oak_runtime" } oak_services = { path = "../oak_services" } oak_tests = { path = "rust/oak_tests" } oak_utils = { path = "../oak_utils" } diff --git a/sdk/rust/oak/build.rs b/sdk/rust/oak/build.rs index 0797ca7b130..f77031fb6ee 100644 --- a/sdk/rust/oak/build.rs +++ b/sdk/rust/oak/build.rs @@ -19,7 +19,7 @@ fn main() { &[ "../../../oak_services/proto/storage_service.proto", "../../../oak_services/proto/roughtime_service.proto", - "../../../oak/proto/handle.proto", + "../../../proto/handle.proto", ], &["../../.."], oak_utils::ProtoOptions { @@ -34,7 +34,7 @@ fn main() { std::fs::create_dir_all(&handle_tests_out).unwrap(); oak_utils::compile_protos_with_options( &["tests/handle_extract_inject.proto"], - &["tests/", "../../../oak/proto"], + &["tests/", "../../../proto"], oak_utils::ProtoOptions { out_dir_override: Some(handle_tests_out), ..Default::default() diff --git a/sdk/rust/oak_app_build/src/main.rs b/sdk/rust/oak_app_build/src/main.rs index 08e67354bbd..61e80700b09 100644 --- a/sdk/rust/oak_app_build/src/main.rs +++ b/sdk/rust/oak_app_build/src/main.rs @@ -19,7 +19,7 @@ //! Invoke with: //! //! ```shell -//! cargo run --manifest-path=oak/server/rust/oak_app_build/Cargo.toml -- \ +//! cargo run --manifest-path=sdk/rust/oak_app_build/Cargo.toml -- \ //! --manifest-path= //! ``` //! diff --git a/oak/server/testdata/empty.wat b/testdata/empty.wat similarity index 100% rename from oak/server/testdata/empty.wat rename to testdata/empty.wat diff --git a/oak/server/testdata/minimal.wat b/testdata/minimal.wat similarity index 100% rename from oak/server/testdata/minimal.wat rename to testdata/minimal.wat diff --git a/oak/server/testdata/missing.wat b/testdata/missing.wat similarity index 100% rename from oak/server/testdata/missing.wat rename to testdata/missing.wat diff --git a/oak/server/testdata/wrong.wat b/testdata/wrong.wat similarity index 100% rename from oak/server/testdata/wrong.wat rename to testdata/wrong.wat