| # 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("//build/rust/rustc_test.gni") |
| import("//build/testing/test_spec.gni") |
| |
| assert(is_host, "protocols is for use with the host toolchain only") |
| |
| rustc_library("lib") { |
| name = "protocols" |
| edition = "2021" |
| with_unit_tests = true |
| |
| visibility = [ |
| ":*", |
| "//src/developer/ffx/daemon/protocols/*", |
| "//src/developer/ffx/daemon/server:*", |
| ] |
| |
| deps = [ |
| "macros:lib", |
| "//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust", |
| "//src/connectivity/overnet/lib/core", |
| "//src/developer/ffx/config:lib", |
| "//src/developer/ffx/daemon/core:lib", |
| "//src/developer/ffx/daemon/events:lib", |
| "//src/developer/ffx/daemon/target:lib", |
| "//src/developer/ffx/fidl:fuchsia.developer.ffx_rust", |
| "//src/developer/ffx/lib/addr:lib", |
| "//src/developer/ffx/lib/target:lib", |
| "//src/lib/async-utils", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-lock", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ |
| "//src/developer/ffx/lib/protocols/fidl:fuchsia.ffx.test_rust", |
| "//src/lib/fuchsia", |
| ] |
| |
| sources = [ |
| "src/context.rs", |
| "src/lib.rs", |
| "src/prelude.rs", |
| "src/protocols.rs", |
| "src/register.rs", |
| "src/testing/fake_daemon.rs", |
| "src/testing/mod.rs", |
| ] |
| } |
| |
| group("protocols") { |
| public_deps = [ ":lib" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":lib_test($host_toolchain)", |
| "dependencies:tests($host_toolchain)", |
| ] |
| } |