| # Copyright 2022 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/host.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//src/developer/ffx/build/ffx_tool.gni") |
| import("//src/developer/ffx/lib/version/build/ffx_apply_version.gni") |
| |
| rustc_library("lib") { |
| # This is named as such to avoid a conflict with an existing ffx echo command. |
| name = "ffx_tool_echo" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//src/developer/ffx/fidl:fuchsia.developer.ffx_rust", |
| "//src/developer/ffx/lib/fho:lib", |
| "//src/developer/ffx/lib/target/holders:lib", |
| "//src/developer/ffx/lib/writer:lib", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:async-trait", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:futures-lite", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| } |
| |
| ffx_tool("ffx_echo") { |
| edition = "2021" |
| output_name = "ffx-echo" |
| deps = [ |
| ":lib", |
| "//src/developer/ffx/lib/fho:lib", |
| "//src/lib/fuchsia-async", |
| ] |
| sources = [ "src/main.rs" ] |
| } |
| |
| group("echo") { |
| public_deps = [ |
| ":ffx_echo", |
| ":ffx_echo_host_tool", |
| ] |
| } |
| |
| group("bin") { |
| public_deps = [ ":ffx_echo_versioned" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":lib_test($host_toolchain)" ] |
| } |