blob: 12810d1b9f8a5f6034c1adbbc262a59ac8a81b31 [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"])
# Note: Host-only target matching platform-only deps via target_compatible_with.
rustc_library(
name = "lib",
srcs = [
"src/args.rs",
"src/lib.rs",
],
crate_name = "ffx_product_lookup",
edition = "2024",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//src/developer/ffx/plugins/product:__pkg__"],
deps = [
"//src/developer/ffx/config:lib",
"//src/developer/ffx/lib/fho:lib",
"//src/developer/ffx/lib/pbms:lib",
"//src/developer/ffx/lib/safe_string:lib",
"//src/developer/ffx/lib/writer:lib",
"//src/developer/ffx/plugins/product/common:lib",
"//src/developer/ffx/plugins/product/list:lib",
"//src/lib/structured_ui",
"//third_party/rust_crates/vendor:argh",
"//third_party/rust_crates/vendor:log",
],
)
host_rustc_test(
name = "lib_test",
crate = ":lib",
crate_name = "ffx_product_lookup_lib_test",
edition = "2024",
visibility = [
"//src/developer/ffx:__pkg__",
"//src/developer/ffx/plugins/product:__pkg__",
],
deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates/vendor:serde_json",
"//third_party/rust_crates/vendor:tempfile",
],
)