| # 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("//src/developer/ffx/build/ffx_tool.gni") |
| |
| assert(is_host, "ffx driver subtool is intended for host toolchain use only") |
| |
| rustc_library("ffx_driver_args") { |
| version = "0.1.0" |
| edition = "2021" |
| sources = [ "src/args.rs" ] |
| source_root = "src/args.rs" |
| |
| deps = [ |
| "//src/devices/bin/driver_tools:lib", |
| "//third_party/rust_crates:argh", |
| ] |
| } |
| |
| rustc_library("ffx_driver") { |
| version = "0.1.0" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| ":ffx_driver_args", |
| "//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust", |
| "//sdk/fidl/fuchsia.driver.development:fuchsia.driver.development_rust", |
| "//sdk/fidl/fuchsia.driver.playground:fuchsia.driver.playground_rust", |
| "//sdk/fidl/fuchsia.driver.registrar:fuchsia.driver.registrar_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", |
| "//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager_rust", |
| "//src/developer/ffx/lib/fho:lib", |
| "//src/developer/ffx/lib/rcs:lib", |
| "//src/developer/ffx/lib/target/holders:lib", |
| "//src/developer/ffx/lib/writer:lib", |
| "//src/devices/bin/driver_tools:lib", |
| "//src/devices/bin/driver_tools/connector:lib", |
| "//src/lib/fidl/rust/fidl", |
| "//src/sys/lib/component_debug", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:rustyline", |
| ] |
| sources = [ "src/lib.rs" ] |
| } |
| |
| ffx_tool("ffx_driver_tool") { |
| edition = "2021" |
| output_name = "ffx-driver" |
| deps = [ |
| ":ffx_driver", |
| "//src/developer/ffx/lib/fho:lib", |
| "//src/lib/fuchsia-async", |
| ] |
| sources = [ "src/main.rs" ] |
| |
| sdk_target_name = "sdk" |
| sdk_category = "partner" |
| } |
| |
| group("driver") { |
| public_deps = [ |
| ":ffx_driver_tool", |
| ":ffx_driver_tool_host_tool", |
| ] |
| } |
| |
| group("bin") { |
| public_deps = [ ":ffx_driver_tool_versioned" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":ffx_driver_test" ] |
| } |