blob: 92c1d8d1a155ff14869eadae7dbf71e2a11aa63a [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/args.rs",
"src/lib.rs",
"src/load_config.rs",
"src/unique_release_info.rs",
],
crate_name = "ffx_product_get_version",
edition = "2024",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//src/developer/ffx/plugins/product:__pkg__"],
deps = [
"//src/developer/ffx/lib/fho:lib",
"//src/developer/ffx/lib/writer:lib",
"//src/lib/assembly/api",
"//src/lib/assembly/partitions_config",
"//src/lib/assembly/product_bundle",
"//src/lib/assembly/release_info",
"//src/lib/assembly/util",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:argh",
"//third_party/rust_crates/vendor:camino",
"//third_party/rust_crates/vendor:serde",
"//third_party/rust_crates/vendor:serde_json",
],
)
host_rustc_test(
name = "lib_test",
crate = ":lib",
crate_name = "ffx_product_get_version_lib_test",
edition = "2024",
visibility = [
"//src/developer/ffx:__pkg__",
"//src/developer/ffx/plugins/product:__pkg__",
],
deps = [
"//third_party/rust_crates/vendor:tempfile",
],
)