diff --git a/examples/abitest/module_0/rust/build.rs b/examples/abitest/module_0/rust/build.rs index effedacd7f3..830ba327abf 100644 --- a/examples/abitest/module_0/rust/build.rs +++ b/examples/abitest/module_0/rust/build.rs @@ -1,3 +1,19 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + fn main() { oak_utils::run_protoc_rust_grpc(protoc_rust_grpc::Args { out_dir: "src/proto", diff --git a/examples/abitest/module_0/rust/src/proto/mod.rs b/examples/abitest/module_0/rust/src/proto/mod.rs index eaec62d6246..fe71700bf62 100644 --- a/examples/abitest/module_0/rust/src/proto/mod.rs +++ b/examples/abitest/module_0/rust/src/proto/mod.rs @@ -1,2 +1,18 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + pub mod abitest; pub mod abitest_grpc; diff --git a/examples/chat/module/rust/build.rs b/examples/chat/module/rust/build.rs index 1e564cd0354..5819008087f 100644 --- a/examples/chat/module/rust/build.rs +++ b/examples/chat/module/rust/build.rs @@ -1,3 +1,19 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + fn main() { oak_utils::run_protoc_rust_grpc(protoc_rust_grpc::Args { out_dir: "src/proto", diff --git a/examples/chat/module/rust/src/command.rs b/examples/chat/module/rust/src/command.rs index e02cf663818..ad975ade9da 100644 --- a/examples/chat/module/rust/src/command.rs +++ b/examples/chat/module/rust/src/command.rs @@ -1,3 +1,19 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize)] diff --git a/examples/chat/module/rust/src/proto/mod.rs b/examples/chat/module/rust/src/proto/mod.rs index 12782d6ec21..d5e1635b08c 100644 --- a/examples/chat/module/rust/src/proto/mod.rs +++ b/examples/chat/module/rust/src/proto/mod.rs @@ -1,2 +1,18 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + pub mod chat; pub mod chat_grpc; diff --git a/examples/hello_world/module/rust/build.rs b/examples/hello_world/module/rust/build.rs index f9cd87f2d49..b88493aa336 100644 --- a/examples/hello_world/module/rust/build.rs +++ b/examples/hello_world/module/rust/build.rs @@ -1,3 +1,19 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + fn main() { oak_utils::run_protoc_rust_grpc(protoc_rust_grpc::Args { out_dir: "src/proto", diff --git a/examples/hello_world/module/rust/src/proto/mod.rs b/examples/hello_world/module/rust/src/proto/mod.rs index 3a16d4da323..3fa71ed9beb 100644 --- a/examples/hello_world/module/rust/src/proto/mod.rs +++ b/examples/hello_world/module/rust/src/proto/mod.rs @@ -1,2 +1,18 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + pub mod hello_world; pub mod hello_world_grpc; diff --git a/examples/private_set_intersection/module/rust/build.rs b/examples/private_set_intersection/module/rust/build.rs index 917808f228e..04dc5f3025b 100644 --- a/examples/private_set_intersection/module/rust/build.rs +++ b/examples/private_set_intersection/module/rust/build.rs @@ -1,3 +1,19 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + fn main() { oak_utils::run_protoc_rust_grpc(protoc_rust_grpc::Args { out_dir: "src/proto", diff --git a/examples/private_set_intersection/module/rust/src/proto/mod.rs b/examples/private_set_intersection/module/rust/src/proto/mod.rs index d74149b44e4..a951f502f9c 100644 --- a/examples/private_set_intersection/module/rust/src/proto/mod.rs +++ b/examples/private_set_intersection/module/rust/src/proto/mod.rs @@ -1,2 +1,18 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + pub mod private_set_intersection; pub mod private_set_intersection_grpc; diff --git a/examples/running_average/module/rust/build.rs b/examples/running_average/module/rust/build.rs index 781ed1b8fd1..645d97e6716 100644 --- a/examples/running_average/module/rust/build.rs +++ b/examples/running_average/module/rust/build.rs @@ -1,3 +1,19 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + fn main() { oak_utils::run_protoc_rust_grpc(protoc_rust_grpc::Args { out_dir: "src/proto", diff --git a/examples/running_average/module/rust/src/proto/mod.rs b/examples/running_average/module/rust/src/proto/mod.rs index 05a5d58c41e..0dd4b1d46cf 100644 --- a/examples/running_average/module/rust/src/proto/mod.rs +++ b/examples/running_average/module/rust/src/proto/mod.rs @@ -1,2 +1,18 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + pub mod running_average; pub mod running_average_grpc; diff --git a/examples/rustfmt/module/rust/build.rs b/examples/rustfmt/module/rust/build.rs index a19b5ef77c4..02bd26f5748 100644 --- a/examples/rustfmt/module/rust/build.rs +++ b/examples/rustfmt/module/rust/build.rs @@ -1,3 +1,19 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + fn main() { oak_utils::run_protoc_rust_grpc(protoc_rust_grpc::Args { out_dir: "src/proto", diff --git a/examples/rustfmt/module/rust/src/proto/mod.rs b/examples/rustfmt/module/rust/src/proto/mod.rs index 639c3e122e1..14ad34adc5b 100644 --- a/examples/rustfmt/module/rust/src/proto/mod.rs +++ b/examples/rustfmt/module/rust/src/proto/mod.rs @@ -1,2 +1,18 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + pub mod rustfmt; pub mod rustfmt_grpc; diff --git a/examples/translator/common/build.rs b/examples/translator/common/build.rs index 0487b1cc67f..51973064fc3 100644 --- a/examples/translator/common/build.rs +++ b/examples/translator/common/build.rs @@ -1,3 +1,19 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + fn main() { oak_utils::run_protoc_rust_grpc(protoc_rust_grpc::Args { out_dir: "src/proto", diff --git a/examples/translator/common/src/proto/mod.rs b/examples/translator/common/src/proto/mod.rs index e97d1900a97..ca884f2382d 100644 --- a/examples/translator/common/src/proto/mod.rs +++ b/examples/translator/common/src/proto/mod.rs @@ -1,2 +1,18 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + pub mod translator; pub mod translator_grpc; diff --git a/oak/server/rust/oak_abi/build.rs b/oak/server/rust/oak_abi/build.rs index 8b2ee51aa39..6fe24804379 100644 --- a/oak/server/rust/oak_abi/build.rs +++ b/oak/server/rust/oak_abi/build.rs @@ -1,3 +1,19 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + fn main() { oak_utils::run_protoc_rust(protoc_rust::Args { out_dir: "src/proto", diff --git a/oak/server/rust/oak_abi/src/proto/mod.rs b/oak/server/rust/oak_abi/src/proto/mod.rs index 0e34cd6852d..25c877eddfb 100644 --- a/oak/server/rust/oak_abi/src/proto/mod.rs +++ b/oak/server/rust/oak_abi/src/proto/mod.rs @@ -1,5 +1,18 @@ -//! Auto-generated code for processing protocol buffer message definitions and -//! gRPC service definitions. +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #[allow(clippy::all)] pub mod oak_api; diff --git a/oak/server/rust/oak_runtime/build.rs b/oak/server/rust/oak_runtime/build.rs index 170649bbf63..c925a9a1bed 100644 --- a/oak/server/rust/oak_runtime/build.rs +++ b/oak/server/rust/oak_runtime/build.rs @@ -1,3 +1,19 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + fn main() { oak_utils::run_protoc_rust(protoc_rust::Args { out_dir: "src/proto", diff --git a/oak/server/rust/oak_runtime/src/proto/mod.rs b/oak/server/rust/oak_runtime/src/proto/mod.rs index d338b3b9049..2a18a772929 100644 --- a/oak/server/rust/oak_runtime/src/proto/mod.rs +++ b/oak/server/rust/oak_runtime/src/proto/mod.rs @@ -1,5 +1,18 @@ -//! Auto-generated code for processing protocol buffer message definitions and -//! gRPC service definitions. +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #[allow(clippy::all)] pub mod manager; diff --git a/oak/server/wasm_node_fuzzer.cc b/oak/server/wasm_node_fuzzer.cc index a3d8adb3527..5e3386a087c 100644 --- a/oak/server/wasm_node_fuzzer.cc +++ b/oak/server/wasm_node_fuzzer.cc @@ -1,3 +1,19 @@ +/* + * Copyright 2019 The Project Oak Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include "oak/server/wasm_node.h" diff --git a/scripts/temp.sh b/scripts/temp.sh new file mode 100755 index 00000000000..ab4b5f3c032 --- /dev/null +++ b/scripts/temp.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Keep this in sync with /scripts/format. + +readonly SCRIPTS_DIR="$(dirname "$(readlink -f "$0")")" +# shellcheck source=scripts/common +source "$SCRIPTS_DIR/common" + + +find . \ + \( \ + -not \( -path ./bazel-cache -prune \) -and \ + -not \( -path ./cargo-cache -prune \) -and \ + -not \( -path ./examples/target -prune \) -and \ + -not \( -path ./oak/server/rust/target -prune \) -and \ + -not \( -path ./sdk/rust/target -prune \) -and \ + -not \( -path ./third_party -prune \) \ + \( -type f \( -name '*.rs' -o -name '*.cc' \) \) \ + \) -exec ./scripts/check_license {} + diff --git a/sdk/rust/oak/build.rs b/sdk/rust/oak/build.rs index 9c7bb328c72..ea47bf77417 100644 --- a/sdk/rust/oak/build.rs +++ b/sdk/rust/oak/build.rs @@ -1,3 +1,19 @@ +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + fn main() { oak_utils::run_protoc_rust(protoc_rust::Args { out_dir: "src/proto", diff --git a/sdk/rust/oak/src/proto/mod.rs b/sdk/rust/oak/src/proto/mod.rs index dc2a1831247..f27f79b316d 100644 --- a/sdk/rust/oak/src/proto/mod.rs +++ b/sdk/rust/oak/src/proto/mod.rs @@ -1,5 +1,18 @@ -//! Auto-generated code for processing protocol buffer message definitions and -//! gRPC service definitions. +// +// Copyright 2019 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #[allow(clippy::all)] pub mod code;