| # Copyright 2022 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") |
| |
| rustc_binary("bin") { |
| edition = "2021" |
| testonly = true |
| name = "configurable_netstack" |
| with_unit_tests = true |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.network:fuchsia.hardware.network_rust", |
| "//sdk/fidl/fuchsia.net:fuchsia.net_rust", |
| "//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_rust", |
| "//sdk/fidl/fuchsia.net.interfaces.admin:fuchsia.net.interfaces.admin_rust", |
| "//sdk/fidl/fuchsia.net.stack:fuchsia.net.stack_rust", |
| "//src/connectivity/network/testing/netemul/fidl:fuchsia.netemul_rust", |
| "//src/lib/async-utils", |
| "//src/lib/diagnostics/log/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/network/fidl_fuchsia_net_ext", |
| "//src/lib/network/fidl_fuchsia_net_interfaces_ext", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures-util", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| ] |
| test_deps = [ "//third_party/rust_crates:assert_matches" ] |
| sources = [ "src/main.rs" ] |
| configs -= [ "//build/config/rust/lints:allow_unused_results" ] |
| } |
| |
| fuchsia_component("configurable-netstack") { |
| testonly = true |
| manifest = "meta/configurable-netstack.cml" |
| deps = [ |
| ":bin", |
| "//src/connectivity/network/netstack:component-debug", |
| ] |
| } |
| |
| fuchsia_component("configurable-netstack-fast-udp") { |
| testonly = true |
| manifest = "meta/configurable-netstack-fast-udp.cml" |
| deps = [ |
| ":bin", |
| "//src/connectivity/network/netstack:component-with-fast-udp-debug", |
| ] |
| } |
| |
| fuchsia_component("configurable-netstack-netstack3") { |
| testonly = true |
| manifest = "meta/configurable-netstack-netstack3.cml" |
| deps = [ |
| ":bin", |
| "//src/connectivity/network/netstack3:component-debug", |
| ] |
| } |
| |
| fuchsia_unittest_package("configurable-netstack-unit-tests") { |
| deps = [ ":bin_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":configurable-netstack-unit-tests", |
| "tests", |
| ] |
| } |