blob: 734599ab8e597b599d2c1734f66622b70649f65a [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_uart_host_driver_lib_test"],
visibility = ["//src/developer/ffx:__pkg__"],
)
rustc_library(
name = "lib",
srcs = [
"src/analytics.rs",
"src/lib.rs",
],
crate_name = "ffx_uart_host_driver",
edition = "2024",
target_compatible_with = HOST_OS_CONSTRAINTS,
deps = [
"//src/developer/ffx/command:lib",
"//src/developer/ffx/config:lib",
"//src/developer/ffx/lib/fho:lib",
"//src/developer/ffx/lib/logging:lib",
"//src/developer/ffx/lib/uart_driver_api:lib",
"//src/developer/ffx/tools/uart:lib",
"//src/developer/ffx/tools/uart_driver/impl:lib",
"//src/lib/analytics/rust:lib",
"//third_party/rust_crates/vendor:argh",
"//third_party/rust_crates/vendor:log",
"//third_party/rust_crates/vendor:serde_json",
],
)
# LINT.IfChange
ffx_tool(
name = "ffx_uart_driver",
srcs = ["src/main.rs"],
binary_name = "ffx-uart-driver",
edition = "2024",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//src/developer/ffx/tools/uart:__pkg__"],
deps = [
":lib",
"//src/developer/ffx/lib/version:lib",
"//src/lib/fuchsia-async",
],
)
# LINT.ThenChange(BUILD.gn)
host_rustc_test(
name = "ffx_uart_host_driver_lib_test",
crate = ":lib",
deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates/vendor:tempfile",
],
)