blob: 891eb94f925bd49d81ed153f4782b071bce3bbe2 [file] [log] [blame]
# Copyright 2018 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_binary.gni")
import("//src/sys/build/components.gni")
rustc_binary("bin") {
name = "netstack3"
edition = "2018"
with_unit_tests = true
deps = [
"core:netstack3-core",
"//garnet/lib/rust/never",
"//sdk/fidl/fuchsia.hardware.ethernet:fuchsia.hardware.ethernet-rustc",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//sdk/fidl/fuchsia.net:fuchsia.net-rustc",
"//sdk/fidl/fuchsia.net.icmp:fuchsia.net.icmp-rustc",
"//sdk/fidl/fuchsia.net.icmp:fuchsia.net.icmp-rustc",
"//sdk/fidl/fuchsia.net.stack:fuchsia.net.stack-rustc",
"//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket-rustc",
"//src/connectivity/lib/net-types",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/network/ethernet",
"//src/lib/network/fidl_fuchsia_hardware_ethernet_ext",
"//src/lib/network/fidl_fuchsia_net_ext",
"//src/lib/network/fidl_fuchsia_net_stack_ext",
"//src/lib/network/packet",
"//src/lib/syslog/rust:syslog",
"//src/lib/zerocopy",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:libc",
"//third_party/rust_crates:log",
"//third_party/rust_crates:pin-utils",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:thiserror",
]
test_deps = [
"//src/connectivity/network/testing/netemul/lib/fidl:network-rustc",
"//src/connectivity/network/testing/netemul/lib/fidl:sandbox-rustc",
]
# TODO(48460): Fix the leaks and remove this.
non_rust_deps = [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}
fuchsia_component("component") {
component_name = "netstack3"
manifest = "meta/netstack3.cmx"
deps = [ ":bin" ]
}
fuchsia_package("netstack3") {
deps = [ ":component" ]
}
fuchsia_component("bin-test") {
component_name = "netstack3-bin-test"
testonly = true
manifest = "meta/netstack3-bin-test.cmx"
deps = [ ":bin_test" ]
}
fuchsia_component("core-lib-test") {
component_name = "netstack3-core-lib-test"
testonly = true
manifest = "meta/netstack3-core-lib-test.cmx"
deps = [ "core:netstack3-core_test" ]
}
fuchsia_component("specialize-ip-macro-test-lib-test") {
testonly = true
manifest = "meta/specialize-ip-macro-test-lib-test.cmx"
deps = [ "core/specialize-ip-macro/test:lib_test" ]
}
fuchsia_test_package("netstack3-tests") {
test_components = [
":bin-test",
":core-lib-test",
":specialize-ip-macro-test-lib-test",
]
}
group("tests") {
testonly = true
deps = [
":netstack3",
":netstack3-tests",
"tools",
]
}