Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

"tf_trusted_config_proto" or "tf_trusted_config_proto_cc" as target deps in BUILD file? #3

Closed
saxenauts opened this issue Feb 22, 2019 · 1 comment

Comments

@saxenauts
Copy link

In the following rules definitions (tf_trusted/BUILD), the rule name defined in sim_enclave is "tf_trusted_config_proto", and the dependencies in sim_enclave and enclave_loader is named "tf_trusted_config_proto_cc".

Just wanted to check if this is intended.

# Contains extensions to enclave protos.
asylo_proto_library(
    name = "tf_trusted_config_proto",
    srcs = ["tf_trusted_config.proto"],
    deps = ["@com_google_asylo//asylo:enclave_proto"],
)

# The enclave
sim_enclave(
    name = "tf_trusted_enclave.so",
    srcs = ["tf_trusted_enclave.cc"],
    config = "@com_google_asylo//asylo/grpc/util:grpc_enclave_config",
    deps = [
        ":tf_trusted_config_proto_cc",
        ":model_server",
        "@com_github_grpc_grpc//:grpc++",
        "@com_github_grpc_grpc//:grpc++_reflection",
        "@com_google_absl//absl/memory",
        "@com_google_absl//absl/synchronization",
        "@com_google_asylo//asylo:enclave_runtime",
        "@com_google_asylo//asylo/util:status",
    ],
)

# The driver for the gRPC server enclave.
enclave_loader(
    name = "tf_trusted",
    srcs = ["tf_trusted_driver.cc"],
    enclaves = {"enclave": ":tf_trusted_enclave.so"},
    loader_args = ["--enclave_path='{enclave}'"],
    deps = [
        ":tf_trusted_config_proto_cc",
        "@com_github_gflags_gflags//:gflags_nothreads",
        "@com_google_absl//absl/synchronization",
        "@com_google_absl//absl/time",
        "@com_google_asylo//asylo:enclave_client",
        "@com_google_asylo//asylo/util:logging",
    ],
)
@justin1121
Copy link
Member

Hello there,

Thanks for the question. sim_enclave is using the correct rule. I'm not a bazel expert but what I think is happening is that the asylo_proto_library function is generating a new rule called tf_trusted_config_proto_cc. This BUILD file was developed based on the Asylo tutorials and you can see that they're doing a similar thing here: https://asylo.dev/docs/guides/quickstart.html#building-and-running-an-enclave-application

Let me know if you have further questions. Happy to help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants