blob: 24000a661e676a9015f8e45602d544342f092c5c [file] [log] [blame]
# Copyright 2024 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_library.gni")
import(
"//src/connectivity/network/netstack3/core/rustc_library_with_features.gni")
rustc_library_with_features("netstack3-base") {
edition = "2021"
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
sources = [
"src/context.rs",
"src/counters.rs",
"src/inspect.rs",
"src/lib.rs",
"src/time.rs",
"src/time/local_timer_heap.rs",
"src/time/testutil.rs",
]
deps = [
"//src/connectivity/lib/net-types",
"//src/lib/fakealloc",
]
if (!is_host) {
configs += [ "//src/connectivity/network/netstack3:netstack3_configs" ]
}
feature_sets = [
{
features = []
with_unit_tests = true
},
# A variant of the netstack3-base library that exposes test utilities.
{
target_name = "netstack3-base-testutils"
testonly = true
features = [ "testutils" ]
},
]
}
fuchsia_unittest_package("netstack3-core-base-test") {
deps = [ ":netstack3-base_test" ]
}
group("tests") {
testonly = true
deps = [
":netstack3-base_test($host_toolchain)",
":netstack3-core-base-test",
]
}