| # Copyright 2019 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/fidl/fidl.gni") |
| import("//build/host.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/testing/test_spec.gni") |
| |
| group("development-bridge") { |
| testonly = true |
| |
| public_deps = [ |
| ":ffx", |
| ":tests", |
| ] |
| } |
| |
| if (host_toolchain == current_toolchain) { |
| rustc_binary("bin") { |
| name = "ffx" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| ":bridge-rustc", |
| ":daemon", |
| "//sdk/fidl/fuchsia.overnet:fuchsia.overnet-rustc", |
| "//sdk/fidl/fuchsia.overnet.protocol:fuchsia.overnet.protocol-rustc", |
| "//sdk/fidl/fuchsia.test:fuchsia.test-rustc", |
| "//src/connectivity/overnet/lib/hoist", |
| "//src/developer/remote-control/service:remote-control-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/test_executor/rust:test_executor", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:regex", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:signal-hook", |
| "//third_party/rust_crates:thiserror", |
| ] |
| non_rust_deps = [ "//third_party/boringssl" ] |
| } |
| |
| rustc_library("daemon") { |
| name = "ffx_daemon" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| ":bridge-rustc", |
| "//sdk/fidl/fuchsia.overnet:fuchsia.overnet-rustc", |
| "//sdk/fidl/fuchsia.overnet.protocol:fuchsia.overnet.protocol-rustc", |
| "//src/connectivity/overnet/lib/hoist", |
| "//src/connectivity/overnet/tools/ascendd:lib", |
| "//src/developer/remote-control/service:remote-control-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/mdns/rust:mdns", |
| "//src/lib/network/packet", |
| "//src/lib/zerocopy", |
| "//src/sys/test_manager/fidl:test_manager-rustc", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-std", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:chrono", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:libc", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:net2", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tokio", |
| ] |
| non_rust_deps = [ "//third_party/boringssl" ] |
| test_deps = [] |
| } |
| } |
| |
| group("ffx") { |
| deps = [ |
| ":bin($host_toolchain)", |
| ":daemon($host_toolchain)", |
| ":host", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":bin_test($host_toolchain)", |
| ":daemon_test($host_toolchain)", |
| ] |
| } |
| |
| fidl("bridge") { |
| name = "fidl.developer.bridge" |
| |
| sources = [ "fidl/daemon.fidl" ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.test:fuchsia.test", |
| "//sdk/fidl/fuchsia.url", |
| "//src/developer/remote-control/service:remote-control", |
| "//src/sys/test_manager/fidl:test_manager", |
| ] |
| |
| fuzzers = [ |
| { |
| protocol = "fidl.developer.bridge.Daemon" |
| }, |
| ] |
| } |
| |
| install_host_tools("host") { |
| deps = [ ":bin($host_toolchain)" ] |
| |
| outputs = [ "ffx" ] |
| } |