blob: 418a04a89c32627083c8e3a80f765246f5ac9e5a [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")
load("//src/developer/ffx/build:ffx_tool.bzl", "ffx_tool")
package(default_applicable_licenses = ["//:license"])
test_suite(
name = "host_tests",
target_compatible_with = HOST_OS_CONSTRAINTS,
tests = [":ffx_tool_monitor_lib_test"],
visibility = ["//src/developer/ffx:__pkg__"],
)
rustc_library(
name = "lib",
srcs = [
"src/args.rs",
"src/lib.rs",
],
crate_name = "ffx_tool_monitor",
edition = "2024",
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = [
"//src/developer/ffx/config:lib",
"//src/developer/ffx/lib/fho:lib",
"//src/developer/ffx/lib/target:lib",
"//src/developer/ffx/lib/writer:lib",
"//src/developer/ffx/plugins/target/list/target_formatter",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-hyper",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:argh",
"//third_party/rust_crates/vendor:futures",
"//third_party/rust_crates/vendor:http-body-util",
"//third_party/rust_crates/vendor:hyper",
"//third_party/rust_crates/vendor:hyper-util",
"//third_party/rust_crates/vendor:log",
"//third_party/rust_crates/vendor:serde",
"//third_party/rust_crates/vendor:serde_json",
"//third_party/rust_crates/vendor:tokio",
],
)
# Needed for Honeydew's SDK inclusion
#
# TODO(https://fxbug.dev/330934833): Remove when IDK allows for `testonly` targets in dep
# tree or when we can separate the concept of data_dep from host_test_data.
# LINT.IfChange
ffx_tool(
name = "ffx_monitor",
testonly = False,
srcs = ["src/main.rs"],
binary_name = "ffx-monitor",
edition = "2024",
deps = [
":lib",
"//src/developer/ffx/lib/fho:lib",
"//src/lib/fuchsia-async",
],
)
# LINT.ThenChange(BUILD.gn)
host_rustc_test(
name = "ffx_tool_monitor_lib_test",
crate = ":lib",
deps = ["//third_party/rust_crates/vendor:tempfile"],
)