blob: 2dc0fee16b6aa5d2e3c2d2fec6027c2ea7dd7e62 [file] [edit]
# 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("@platforms//host:constraints.bzl", "HOST_CONSTRAINTS")
load("//build/bazel/rules/rust:defs.bzl", "rustc_library")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "lib",
srcs = [
"src/fastboot_interface.rs",
"src/fastboot_proxy.rs",
"src/interface_factory.rs",
"src/lib.rs",
"src/stream.rs",
"src/util.rs",
],
crate_name = "ffx_fastboot_interface",
edition = "2024",
proc_macro_deps = [
"//third_party/rust_crates/vendor:async-trait",
],
target_compatible_with = HOST_CONSTRAINTS,
# The unit test is built and run by Bazel only, see
# //src/developer/ffx:tests, so it is not synced back to GN.
# @bazel2gn:skip
test_deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates/vendor:pretty_assertions",
"//third_party/rust_crates/vendor:rand",
"//third_party/rust_crates/vendor:tempfile",
],
visibility = [
":__pkg__",
"//src/developer/ffx:__pkg__",
"//src/developer/ffx/lib/diagnostics/checks:__pkg__",
"//src/developer/ffx/lib/fastboot:__pkg__",
"//src/developer/ffx/lib/fastboot/connection_factory:__pkg__",
"//src/developer/ffx/lib/fastboot/transport/factory:__pkg__",
"//src/developer/ffx/lib/manual_targets:__pkg__",
"//src/developer/ffx/plugins/target/bootloader:__pkg__",
"//src/developer/ffx/plugins/target/fastboot:__pkg__",
"//src/developer/ffx/plugins/target/flash:__pkg__",
"//src/developer/ffx/plugins/target/reboot:__pkg__",
"//src/developer/ffx/plugins/target/status:__pkg__",
],
with_host_unit_tests = True, # @bazel2gn:skip
deps = [
"//src/developer/fastboot:lib",
"//src/developer/ffx/lib/usb_fastboot_discovery:lib",
"//src/storage/lib/sparse/rust:lib",
"//third_party/rust_crates/vendor:anyhow",
"//third_party/rust_crates/vendor:bytes",
"//third_party/rust_crates/vendor:chrono",
"//third_party/rust_crates/vendor:crc32fast",
"//third_party/rust_crates/vendor:futures",
"//third_party/rust_crates/vendor:log",
"//third_party/rust_crates/vendor:thiserror",
"//third_party/rust_crates/vendor:tokio",
"//third_party/rust_crates/vendor:zerocopy",
],
)