| # Copyright 2021 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. |
| |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/testing/test_spec.gni") |
| |
| assert(is_host, |
| "ffx_fastboot_interface is for use with the host toolchain only") |
| |
| rustc_library("lib") { |
| name = "ffx_fastboot_interface" |
| edition = "2021" |
| with_unit_tests = true |
| |
| visibility = [ |
| ":*", |
| "//src/developer/ffx/daemon/protocols/target_collection:*", |
| "//src/developer/ffx/lib/diagnostics/checks:*", |
| "//src/developer/ffx/lib/fastboot:*", |
| "//src/developer/ffx/lib/fastboot/connection_factory:*", |
| "//src/developer/ffx/lib/fastboot/transport/factory:*", |
| "//src/developer/ffx/lib/manual_targets:*", |
| "//src/developer/ffx/plugins/target/bootloader:*", |
| "//src/developer/ffx/plugins/target/fastboot:*", |
| "//src/developer/ffx/plugins/target/flash:*", |
| "//src/developer/ffx/plugins/target/status:*", |
| ] |
| |
| deps = [ |
| "//src/developer/fastboot:lib", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:chrono", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tokio", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fuchsia", |
| "//third_party/rust_crates:pretty_assertions", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:tempfile", |
| ] |
| |
| sources = [ |
| "src/fastboot_interface.rs", |
| "src/fastboot_proxy.rs", |
| "src/interface_factory.rs", |
| "src/lib.rs", |
| ] |
| } |
| |
| group("ffx_fastboot_interface") { |
| public_deps = [ ":lib" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":lib_test" ] |
| } |