load("@protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
load("@protobuf//bazel:proto_library.bzl", "proto_library")
load("//cuttlefish/bazel:rules.bzl", "cf_cc_library")

package(
    default_visibility = ["//:android_cuttlefish"],
)

proto_library(
    name = "run_cvd_proto",
    srcs = ["runner/run_cvd.proto"],
)

cc_proto_library(
    name = "libcuttlefish_run_cvd_proto",
    deps = [":run_cvd_proto"],
)

cf_cc_library(
    name = "command_util",
    srcs = [
        "runner/defs.cc",
        "snapshot_utils.cc",
        "util.cc",
    ],
    hdrs = [
        "runner/defs.h",
        "snapshot_utils.h",
        "util.h",
    ],
    clang_format_enabled = False,
    deps = [
        ":libcuttlefish_run_cvd_proto",
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/common/libs/utils:environment",
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:json",
        "//cuttlefish/host/libs/config:config_instance_derived",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/posix:readlink",
        "//cuttlefish/posix:strerror",
        "//cuttlefish/posix:symlink",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
        "@jsoncpp",
        "@protobuf",
    ],
)
