Skip to content

Commit

Permalink
Consolidating oak_functions protos under the top level proto package (p…
Browse files Browse the repository at this point in the history
…roject-oak#4453)

Consolidating oak_functions protos under the top level proto package
  • Loading branch information
k-naliuka committed Nov 13, 2023
1 parent ac89c2a commit daddd51
Show file tree
Hide file tree
Showing 16 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion oak_functions/examples/benchmark/module/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
extern crate prost_build;

fn main() {
let file_paths = ["oak_functions/proto/benchmark.proto"];
let file_paths = ["proto/oak_functions/benchmark.proto"];
prost_build::compile_protos(&file_paths, &["../../../../"]).expect("proto compilation failed");

// Tell cargo to rerun this build script if the proto file has changed.
Expand Down
2 changes: 1 addition & 1 deletion oak_functions_abi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Oak Functions WebAssembly modules will typically use more convenient (and safer)
wrappers from the higher-level [Oak Functions SDK](/oak_functions_sdk/).

For a description of the API, see the
[protobuf definition](/oak_functions_sdk/proto/oak_functions_wasm.proto).
[protobuf definition](/proto/oak_functions/sdk/oak_functions_wasm.proto).

## Exported Functions

Expand Down
4 changes: 2 additions & 2 deletions oak_functions_abi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ extern crate prost_build;

fn main() {
let file_paths = [
"oak_functions/proto/abi.proto",
"oak_functions/proto/lookup_data.proto",
"proto/oak_functions/abi.proto",
"proto/oak_functions/lookup_data.proto",
];
prost_build::compile_protos(&file_paths, &[env!("WORKSPACE_ROOT")])
.expect("proto compilation failed");
Expand Down
2 changes: 1 addition & 1 deletion oak_functions_containers_app/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
"../",
&[
"oak_crypto/proto/v1/crypto.proto",
"oak_functions_service/proto/oak_functions.proto",
"proto/oak_functions/service/oak_functions.proto",
],
CodegenOptions {
build_server: true,
Expand Down
2 changes: 1 addition & 1 deletion oak_functions_containers_launcher/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
"../",
&[
"oak_crypto/proto/v1/crypto.proto",
"oak_functions_service/proto/oak_functions.proto",
"proto/oak_functions/service/oak_functions.proto",
],
CodegenOptions {
build_client: true,
Expand Down
2 changes: 1 addition & 1 deletion oak_functions_launcher/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// Generate micro RPC code for exchanging messages with the enclave.
micro_rpc_build::compile(
&[format!(
"{}oak_functions_service/proto/oak_functions.proto",
"{}proto/oak_functions/service/oak_functions.proto",
env!("WORKSPACE_ROOT")
)],
&[env!("WORKSPACE_ROOT")],
Expand Down
4 changes: 2 additions & 2 deletions oak_functions_sdk/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
fn main() {
micro_rpc_build::compile(
&[format!(
"{}oak_functions_sdk/proto/oak_functions_wasm.proto",
"{}proto/oak_functions/sdk/oak_functions_wasm.proto",
env!("WORKSPACE_ROOT")
)],
&[format!("{}oak_functions_sdk/proto", env!("WORKSPACE_ROOT"))],
&[format!("{}proto/oak_functions/sdk", env!("WORKSPACE_ROOT"))],
Default::default(),
);
}
2 changes: 1 addition & 1 deletion oak_functions_service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
enclave binary.

The interface of the service is defined via microRPC in
[`oak_functions.proto`](/oak_functions_service/proto/oak_functions.proto).
[`oak_functions.proto`](/proto/oak_functions/service/oak_functions.proto).

# Lookup

Expand Down
2 changes: 1 addition & 1 deletion oak_functions_service/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use micro_rpc_build::ReceiverType;
fn main() {
micro_rpc_build::compile(
&[format!(
"{}oak_functions_service/proto/oak_functions.proto",
"{}proto/oak_functions/service/oak_functions.proto",
env!("WORKSPACE_ROOT")
)],
&[env!("WORKSPACE_ROOT")],
Expand Down
2 changes: 1 addition & 1 deletion oak_functions_test_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub fn compile_rust_wasm(manifest_path: &str, release: bool) -> anyhow::Result<V
}

/// Serializes the provided map as a contiguous buffer of length-delimited protobuf messages of type
/// [`Entry`](https://github.com/project-oak/oak/blob/main/oak_functions/proto/lookup_data.proto).
/// [`Entry`](https://github.com/project-oak/oak/blob/main/proto/oak_functions/lookup_data.proto).
pub fn serialize_entries(entries: HashMap<Vec<u8>, Vec<u8>>) -> Vec<u8> {
let mut buf = Vec::new();
for (key, value) in entries.into_iter() {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit daddd51

Please sign in to comment.