blob: 7062600c592120d3fde7527f466d91eeaa288ad7 [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/rust:rustc_library.bzl", "rustc_library")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "lib",
srcs = ["src/lib.rs"],
crate_name = "ffx_diagnostics_analytics",
edition = "2024",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = [
"//src/developer/ffx/lib/diagnostics/checks:__pkg__",
"//src/developer/ffx/lib/fastboot/transport/factory:__pkg__",
"//src/developer/ffx/lib/target:__pkg__",
],
deps = [
"//src/developer/ffx/lib/diagnostics/analytics/state:lib",
"//src/developer/ffx/lib/discovery:lib",
"//src/developer/ffx/lib/errors:lib",
"//src/developer/ffx/lib/metrics:lib",
"//src/lib/analytics/rust:lib",
"//src/lib/fidl/rust/fidl",
"//third_party/rust_crates/vendor:log",
],
)
host_rustc_test(
name = "lib_test",
crate = ":lib",
crate_name = "ffx_diagnostics_analytics_lib_test",
edition = "2024",
visibility = [
"//src/developer/ffx:__pkg__",
"//src/developer/ffx/lib/diagnostics:__pkg__",
],
deps = ["//third_party/rust_crates/vendor:pretty_assertions"],
)