blob: 094bf3faffb7ce673942b28762841ba9815d6e0b [file] [log] [blame]
# 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/components.gni")
import("//build/rust/rustc_binary.gni")
import("//third_party/cobalt/metrics_registry.gni")
metrics_registry("wlan_metrics_registry") {
# This must match the ID of our Cobalt project as specified in:
# third_party/cobalt_config/projects.yaml
project_id = 3708719327
generate_rust = true
# We don't need to include a copy of our projects's Cobalt registry in our package because we
# rely on it being packaged with Cobalt itself
generate_binarypb = false
}
rustc_binary("bin") {
name = "wlandevicemonitor"
with_unit_tests = true
edition = "2018"
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//sdk/fidl/fuchsia.wlan.common:fuchsia.wlan.common-rustc",
"//sdk/fidl/fuchsia.wlan.device:fuchsia.wlan.device-rustc",
"//sdk/fidl/fuchsia.wlan.device.service:fuchsia.wlan.device.service-rustc",
"//sdk/fidl/fuchsia.wlan.internal:fuchsia.wlan.internal-rustc",
"//sdk/fidl/fuchsia.wlan.tap:fuchsia.wlan.tap-rustc",
"//src/connectivity/wlan/lib/common/rust/:wlan-common",
"//src/connectivity/wlan/lib/isolated-devmgr",
"//src/connectivity/wlan/lib/wlan_dev",
"//src/lib/diagnostics/inspect/contrib/rust",
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/storage/fuchsia-vfs-watcher",
"//src/lib/zerocopy",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:pin-utils",
"//third_party/rust_crates:tempfile",
"//third_party/rust_crates:void",
]
test_deps = [ "//src/connectivity/wlan/testing/wlantap-client" ]
sources = [
"src/device.rs",
"src/device_watch.rs",
"src/inspect.rs",
"src/main.rs",
"src/service.rs",
"src/watchable_map.rs",
"src/watcher_service.rs",
]
}
fuchsia_package_with_single_component("wlandevicemonitor") {
deps = [
":bin",
":wlan_metrics_registry",
]
manifest = "meta/wlandevicemonitor.cmx"
}
fuchsia_unittest_package("wlandevicemonitor-tests") {
deps = [ ":bin_test" ]
manifest = "meta/wlandevicemonitor_bin_test.cmx"
}