blob: 93442dc66e78479f5d07ef8366079b2c45cd0519 [file]
# Copyright 2026 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
load("//build/bazel/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS")
load("//build/bazel/rules/host_tests:host_rustc_test.bzl", "host_rustc_test")
load("//build/bazel/rules/idk:idk_ffx_tool.bzl", "idk_ffx_tool")
load("//build/bazel/rules/rust:rustc_library.bzl", "rustc_library")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "ffx_coverage_args",
srcs = ["src/args.rs"],
crate_root = "src/args.rs",
edition = "2024",
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = ["//third_party/rust_crates/vendor:argh"],
)
rustc_library(
name = "ffx_coverage",
srcs = ["src/lib.rs"],
edition = "2024",
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = [
":ffx_coverage_args",
"//src/developer/ffx/config:lib",
"//src/developer/ffx/lib/fho:lib",
"//src/developer/ffx/lib/symbol-index:lib",
"//src/developer/ffx/lib/writer:lib",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:glob",
"//third_party/rust_crates/vendor:rayon",
"//third_party/rust_crates/vendor:tempfile",
],
)
idk_ffx_tool(
name = "ffx_coverage_tool",
srcs = ["src/main.rs"],
category = "partner",
edition = "2024",
idk_name = "ffx-coverage",
visibility = ["//sdk:__pkg__"],
deps = [
":ffx_coverage",
"//src/developer/ffx/lib/fho:lib",
"//src/lib/fuchsia-async",
],
)
host_rustc_test(
name = "ffx_coverage_test",
crate = ":ffx_coverage",
visibility = ["//src/developer/ffx:__pkg__"],
deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates/vendor:assert_matches",
],
)