| # 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") { | |
| version = "0.1.0" | |
| edition = "2024" | |
| with_unit_tests = true | |
| deps = [ | |
| "//sdk/fidl/fuchsia.driver.development:fuchsia.driver.development_rust_fdomain", | |
| "//sdk/fidl/fuchsia.driver.registrar:fuchsia.driver.registrar_rust_fdomain", | |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust_fdomain", | |
| "//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager_rust_fdomain", | |
| "//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_fdomain", | |
| "//src/devices/bin/driver_tools/connector:lib_fdomain", | |
| "//src/lib/fdomain/client", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/sys/lib/component_debug:component_debug_fdomain", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:argh", | |
| "//third_party/rust_crates:rustyline", | |
| "//third_party/rust_crates:serde_json", | |
| ] | |
| sources = [ | |
| "src/args.rs", | |
| "src/lib.rs", | |
| ] | |
| } | |
| ffx_tool("ffx_driver_tool") { | |
| edition = "2024" | |
| 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_host_tool" ] | |
| } | |
| group("bin") { | |
| public_deps = [ ":ffx_driver_tool_versioned" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":ffx_driver_test" ] | |
| } |