blob: a6807499e4a196f67c4fa1ed437f5ea066fb8226 [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_staticlib.bzl", "rustc_staticlib")
package(default_applicable_licenses = ["//:license"])
rustc_staticlib(
name = "lib",
srcs = [
"src/commands.rs",
"src/compat.rs",
"src/env_context.rs",
"src/ext_buffer.rs",
"src/fdomain.rs",
"src/lib.rs",
"src/lib_context.rs",
"src/logging.rs",
"src/waker.rs",
],
edition = "2024",
output_name = "fuchsia_controller",
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = ["//src/developer/fuchsia-controller:__subpackages__"],
deps = [
"//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust_fdomain",
"//sdk/fidl/fuchsia.device:fuchsia.device_rust_fdomain",
"//sdk/rust/zx-types",
"//src/developer/ffx/config:lib",
"//src/developer/ffx/lib/discovery:lib",
"//src/developer/ffx/lib/errors:lib",
"//src/developer/ffx/lib/logging:lib",
"//src/developer/ffx/lib/rcs:lib",
"//src/developer/ffx/lib/target:lib",
"//src/developer/ffx/lib/timeout:lib",
"//src/developer/ffx/plugins/target/wait:ffx_wait",
"//src/developer/ffx/plugins/target/wait:ffx_wait_args",
"//src/lib/fdomain/client",
"//src/lib/fdomain/local",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:async-channel",
"//third_party/rust_crates/vendor:async-lock",
"//third_party/rust_crates/vendor:camino",
"//third_party/rust_crates/vendor:futures-lite",
"//third_party/rust_crates/vendor:log",
"//third_party/rust_crates/vendor:serde_json",
"//third_party/rust_crates/vendor:signal-hook",
"//third_party/rust_crates/vendor:thiserror",
"//third_party/rust_crates/vendor:tokio",
],
)
host_rustc_test(
name = "lib_test",
crate = ":lib",
crate_name = "fuchsia_controller_staticlib_test",
visibility = ["//src/developer:__pkg__"],
deps = [
"//sdk/fidl/fuchsia.fdomain:fuchsia.fdomain_rust",
"//sdk/rust/zx-status",
"//third_party/rust_crates/vendor:byteorder",
"//third_party/rust_crates/vendor:futures-test",
"//third_party/rust_crates/vendor:tempfile",
],
)