| # Copyright 2025 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("//src/developer/ffx/build/ffx_plugin.gni") |
| import("//src/developer/ffx/build/ffx_tool.gni") |
| |
| if (is_host) { |
| ffx_plugin("ffx_forward") { |
| version = "0.1.0" |
| edition = "2024" |
| args_sources = [ "src/args.rs" ] |
| args_with_unit_tests = true |
| with_unit_tests = true |
| args_deps = [ |
| "//src/developer/ffx/core:lib", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:regex", |
| ] |
| sources = [ "src/lib.rs" ] |
| deps = [ |
| "//src/developer/ffx/lib/errors:lib", |
| "//src/developer/ffx/lib/fho:lib", |
| "//src/developer/ffx/lib/target/holders:lib", |
| "//src/developer/ffx/lib/target_net:lib", |
| "//src/developer/ffx/lib/writer:lib", |
| "//src/developer/ffx/plugins/speedtest/common:speedtest", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:termion", |
| "//third_party/rust_crates:tokio", |
| ] |
| args_test_deps = [ |
| "//src/connectivity/lib/net-declare", |
| "//third_party/rust_crates:test-case", |
| ] |
| test_deps = [ |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:pretty_assertions", |
| "//third_party/rust_crates:vte", |
| ] |
| } |
| |
| ffx_tool("ffx_forward_tool") { |
| edition = "2024" |
| output_name = "ffx-forward" |
| deps = [ |
| ":ffx_forward", |
| "//src/developer/ffx/lib/fho:lib", |
| "//src/lib/fuchsia-async", |
| ] |
| sources = [ "src/main.rs" ] |
| } |
| } |
| |
| group("forward") { |
| public_deps = [ |
| ":ffx_forward_tool", |
| ":ffx_forward_tool_host_tool", |
| ] |
| } |
| |
| group("bin") { |
| public_deps = [ ":ffx_forward_tool_versioned" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":ffx_forward_tests($host_toolchain)" ] |
| } |