blob: 1882db70cd03d184f76542d853cdb65695bc7f7d [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/rust/rustc_binary.gni")
import("//src/sys/build/components.gni")
rustc_binary("bin") {
output_name = "lowpan_spinel_driver"
with_unit_tests = true
edition = "2018"
deps = [
"//garnet/lib/rust/files_async",
"//sdk/fidl/fuchsia.factory.lowpan:fuchsia.factory.lowpan-rustc",
"//sdk/fidl/fuchsia.hardware.network:fuchsia.hardware.network-rustc",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//sdk/fidl/fuchsia.lowpan:fuchsia.lowpan-rustc",
"//sdk/fidl/fuchsia.lowpan.device:fuchsia.lowpan.device-rustc",
"//sdk/fidl/fuchsia.lowpan.spinel:fuchsia.lowpan.spinel-rustc",
"//sdk/fidl/fuchsia.lowpan.test:fuchsia.lowpan.test-rustc",
"//sdk/fidl/fuchsia.net:fuchsia.net-rustc",
"//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces-rustc",
"//sdk/fidl/fuchsia.net.stack:fuchsia.net.stack-rustc",
"//sdk/fidl/fuchsia.net.tun:fuchsia.net.tun-rustc",
"//src/connectivity/lib/net-declare",
"//src/connectivity/lib/net-types",
"//src/connectivity/lowpan/lib/lowpan_driver_common",
"//src/connectivity/lowpan/lib/spinel_pack",
"//src/connectivity/network/tun:config",
"//src/lib/fdio/rust:fdio",
"//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_stack_ext",
"//src/lib/network/packet",
"//src/lib/network/packet-formats",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/lib/zircon/rust:fuchsia-zircon-status",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:derivative",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:hex",
"//third_party/rust_crates:log",
"//third_party/rust_crates:matches",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:slab",
"//third_party/rust_crates:static_assertions",
"//third_party/rust_crates:thiserror",
]
sources = [
"src/driver/api.rs",
"src/driver/assisting_state.rs",
"src/driver/driver_state.rs",
"src/driver/error_adapter.rs",
"src/driver/inbound.rs",
"src/driver/init.rs",
"src/driver/ipv6_packet_matcher.rs",
"src/driver/misc.rs",
"src/driver/mod.rs",
"src/driver/network.rs",
"src/driver/tasks.rs",
"src/driver/tests.rs",
"src/flow_window.rs",
"src/main.rs",
"src/spinel/commands.rs",
"src/spinel/correlated.rs",
"src/spinel/device_client.rs",
"src/spinel/enums.rs",
"src/spinel/frame_handler.rs",
"src/spinel/mock/fake_device_client.rs",
"src/spinel/mock/mock_device_client.rs",
"src/spinel/mock/mod.rs",
"src/spinel/mod.rs",
"src/spinel/net_flags.rs",
"src/spinel/prop_returning.rs",
"src/spinel/request_desc.rs",
"src/spinel/request_tracker.rs",
"src/spinel/response_handler.rs",
"src/spinel/types.rs",
"src/tun.rs",
]
}
fuchsia_package_with_single_component("lowpan-spinel-driver") {
deps = [ ":bin" ]
manifest = "meta/lowpan-spinel-driver.cmx"
}
fuchsia_unittest_package("lowpan-spinel-driver-test") {
manifest = "meta/lowpan-spinel-driver-test.cmx"
deps = [ ":bin_test" ]
}
group("tests") {
testonly = true
deps = [
":lowpan-spinel-driver-test",
"tests",
]
}