blob: 7f5936f0caad25ab4ff5a9cac2058caa116f2af5 [file] [log] [blame]
# 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/components.gni")
import("//build/fidl/fidl.gni")
import("//build/rust/rustc_binary.gni")
fidl("fuchsia.wlan.wlanix") {
sources = [ "wlanix.fidl" ]
# This is needed due to http://b/422844461.
# We need arbitrarily large messages for persistence,
# above what FIDL can normally handle.
excluded_checks = [ "vector-bounds-not-specified" ]
public_deps = [
"//sdk/fidl/fuchsia.wlan.ieee80211",
"//zircon/vdso/zx",
]
}
rustc_binary("wlanix_bin") {
output_name = "wlanix"
edition = "2024"
with_unit_tests = true
deps = [
":fuchsia.wlan.wlanix_rust",
"//sdk/fidl/fuchsia.power.battery:fuchsia.power.battery_rust",
"//sdk/fidl/fuchsia.wlan.common:fuchsia.wlan.common_rust",
"//sdk/fidl/fuchsia.wlan.device.service:fuchsia.wlan.device.service_rust",
"//sdk/fidl/fuchsia.wlan.ieee80211:fuchsia.wlan.ieee80211_rust",
"//sdk/fidl/fuchsia.wlan.internal:fuchsia.wlan.internal_rust",
"//sdk/fidl/fuchsia.wlan.sme:fuchsia.wlan.sme_rust",
"//sdk/lib/power/state_recorder/rust",
"//sdk/rust/zx",
"//src/connectivity/wlan/lib/common/rust:wlan-common",
"//src/connectivity/wlan/lib/ieee80211",
"//src/connectivity/wlan/lib/telemetry:wlan-telemetry",
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/diagnostics/log/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-sync",
"//src/starnix/lib/third_party/rust_netlink/netlink_packet_core",
"//src/starnix/lib/third_party/rust_netlink/netlink_packet_generic",
"//src/starnix/lib/third_party/rust_netlink/netlink_packet_utils",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:num",
"//third_party/rust_crates:num-derive",
"//third_party/rust_crates:num-traits",
"//third_party/rust_crates:strum",
"//third_party/rust_crates:strum_macros",
]
test_deps = [
"//sdk/fidl/fuchsia.wlan.common.security:fuchsia.wlan.common.security_rust",
"//sdk/fidl/fuchsia.wlan.internal:fuchsia.wlan.internal_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:test-case",
]
sources = [
"src/bss_scorer.rs",
"src/default_drop.rs",
"src/ifaces.rs",
"src/main.rs",
"src/nl80211/attr/band.rs",
"src/nl80211/attr/bss.rs",
"src/nl80211/attr/mod.rs",
"src/nl80211/attr/sta_info.rs",
"src/nl80211/cmd.rs",
"src/nl80211/constants.rs",
"src/nl80211/mod.rs",
"src/nl80211/nested.rs",
"src/security/mod.rs",
"src/security/wep.rs",
]
configs += [ "//build/config/rust/lints:clippy_warn_all" ]
}
fuchsia_component("component") {
manifest = "meta/wlanix.cml"
component_name = "wlanix"
deps = [ ":wlanix_bin" ]
}
fuchsia_package("wlanix") {
deps = [ ":component" ]
}
fuchsia_unittest_package("wlanix-tests") {
deps = [ ":wlanix_bin_test" ]
test_specs = {
log_settings = {
# This allows tests to pass even when there's an error log.
max_severity = "ERROR"
}
}
}