| # Copyright 2017 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/package.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.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 = "wlanstack" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| ":wlan_metrics_registry_rustlib", |
| "////sdk/fidl/fuchsia.wlan.tap:fuchsia.wlan.tap-rustc", |
| "//garnet/lib/rust/io_util", |
| "//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.mesh:fuchsia.wlan.mesh-rustc", |
| "//sdk/fidl/fuchsia.wlan.minstrel:fuchsia.wlan.minstrel-rustc", |
| "//sdk/fidl/fuchsia.wlan.mlme:fuchsia.wlan.mlme-rustc", |
| "//sdk/fidl/fuchsia.wlan.sme:fuchsia.wlan.sme-rustc", |
| "//sdk/fidl/fuchsia.wlan.stats:fuchsia.wlan.stats-rustc", |
| "//src/connectivity/wlan/lib/common/rust/:wlan-common", |
| "//src/connectivity/wlan/lib/eapol", |
| "//src/connectivity/wlan/lib/inspect:wlan-inspect", |
| "//src/connectivity/wlan/lib/sme:wlan-sme", |
| "//src/connectivity/wlan/lib/wlan_dev", |
| "//src/connectivity/wlan/testing/wlantap-client", |
| "//src/lib/cobalt/rust:fuchsia-cobalt", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/inspect/rust/fuchsia-inspect", |
| "//src/lib/inspect/rust/fuchsia-inspect-contrib", |
| "//src/lib/storage/fuchsia-vfs-watcher", |
| "//src/lib/zerocopy", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:pin-utils", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:structopt", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:void", |
| "//zircon/system/fidl/fuchsia-cobalt:fuchsia-cobalt-rustc", |
| "//zircon/system/fidl/fuchsia-io:fuchsia-io-rustc", |
| "//zircon/system/fidl/fuchsia-mem:fuchsia-mem-rustc", |
| ] |
| } |
| |
| package("wlanstack") { |
| deps = [ |
| ":bin", |
| ":wlan_metrics_registry", |
| ] |
| |
| binary = "wlanstack" |
| |
| meta = [ |
| { |
| path = rebase_path("meta/wlanstack.cmx") |
| dest = "wlanstack.cmx" |
| }, |
| ] |
| } |
| |
| test_package("wlanstack-tests") { |
| deps = [ ":bin_test" ] |
| |
| tests = [ |
| { |
| name = "wlanstack_bin_test" |
| environments = basic_envs |
| }, |
| ] |
| } |