blob: 9d6f065abe08d5236edb34879f1f107e2bbc3a2d [file] [log] [blame]
# Copyright 2020 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("dhcpv6_client") {
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.net:fuchsia.net-rustc",
"//sdk/fidl/fuchsia.net.dhcpv6:fuchsia.net.dhcpv6-rustc",
"//sdk/fidl/fuchsia.net.name:fuchsia.net.name-rustc",
"//src/connectivity/lib/net-declare",
"//src/connectivity/network/dhcpv6/core",
"//src/connectivity/network/lib/dns_server_watcher",
"//src/lib/async-utils",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/network/fidl_fuchsia_net_ext",
"//src/lib/network/packet",
"//src/lib/network/packet-formats-dhcp",
"//src/lib/syslog/rust:syslog",
"//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:pin-utils",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:socket2",
"//third_party/rust_crates:thiserror",
]
test_deps = [ "//third_party/rust_crates:matches" ]
sources = [
"src/client.rs",
"src/main.rs",
"src/provider.rs",
]
configs -= [ "//build/config/rust:allow_unused_results" ]
}
fuchsia_component("component") {
component_name = "dhcpv6-client"
manifest = "meta/dhcpv6-client.cmx"
deps = [ ":dhcpv6_client" ]
}
fuchsia_package("dhcpv6-client") {
deps = [ ":component" ]
}
group("client") {
deps = [ ":dhcpv6-client" ]
}
fuchsia_unittest_package("dhcpv6-client-tests") {
manifest = "meta/dhcpv6-client-test.cmx"
deps = [
":dhcpv6_client_test",
# The DHCPv6 client creates sockets so it depends on an implementation of
# `fuchsia.posix.socket.Provider`.
"//src/connectivity/network/netstack:component-debug",
]
}
group("tests") {
testonly = true
deps = [ ":dhcpv6-client-tests" ]
}