| # 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/components.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("lowpan_driver_common") { |
| edition = "2021" |
| with_unit_tests = true |
| features = [ "poll_debugger" ] |
| disable_rustdoc = true # https://issuetracker.google.com/issues/284368914 |
| deps = [ |
| "//sdk/fidl/fuchsia.factory.lowpan:fuchsia.factory.lowpan_rust", |
| "//sdk/fidl/fuchsia.hardware.network:fuchsia.hardware.network_rust", |
| "//sdk/fidl/fuchsia.lowpan:fuchsia.lowpan_rust", |
| "//sdk/fidl/fuchsia.lowpan.device:fuchsia.lowpan.device_rust", |
| "//sdk/fidl/fuchsia.lowpan.driver:fuchsia.lowpan.driver_rust", |
| "//sdk/fidl/fuchsia.lowpan.experimental:fuchsia.lowpan.experimental_rust", |
| "//sdk/fidl/fuchsia.lowpan.spinel:fuchsia.lowpan.spinel_rust", |
| "//sdk/fidl/fuchsia.lowpan.test:fuchsia.lowpan.test_rust", |
| "//sdk/fidl/fuchsia.lowpan.thread:fuchsia.lowpan.thread_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", |
| "//sdk/fidl/fuchsia.net.tun:fuchsia.net.tun_rust", |
| "//src/connectivity/lib/fidl_fuchsia_net_stack_ext", |
| "//src/connectivity/lib/net-types", |
| "//src/connectivity/lib/packet-formats", |
| "//src/connectivity/lowpan/lib/openthread_sys", |
| "//src/connectivity/lowpan/lib/spinel_pack", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-sync", |
| "//src/lib/network/fidl_fuchsia_net_ext", |
| "//src/lib/network/fidl_fuchsia_net_interfaces_ext", |
| "//src/lib/network/packet", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/lib/zircon/rust:fuchsia-zircon-status", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:assert_matches", |
| "//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:slab", |
| "//third_party/rust_crates:socket2", |
| "//third_party/rust_crates:static_assertions", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| sources = [ |
| "src/async_condition.rs", |
| "src/dummy_device.rs", |
| "src/lib.rs", |
| "src/lowpan_device.rs", |
| "src/net/backbone.rs", |
| "src/net/debug.rs", |
| "src/net/iface.rs", |
| "src/net/matcher.rs", |
| "src/net/mod.rs", |
| "src/net/tun.rs", |
| "src/register.rs", |
| "src/serve_to.rs", |
| "src/spinel/correlated.rs", |
| "src/spinel/device_client.rs", |
| "src/spinel/flow_window.rs", |
| "src/spinel/frame_handler/commands.rs", |
| "src/spinel/frame_handler/mod.rs", |
| "src/spinel/frame_handler/prop_returning.rs", |
| "src/spinel/frame_handler/request_desc.rs", |
| "src/spinel/frame_handler/request_tracker.rs", |
| "src/spinel/frame_handler/response_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/types/enums.rs", |
| "src/spinel/types/mod.rs", |
| "src/spinel/types/net_flags.rs", |
| "src/tests.rs", |
| ] |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] |
| } |
| |
| fuchsia_unittest_package("lowpan-driver-common-tests") { |
| deps = [ ":lowpan_driver_common_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":lowpan-driver-common-tests" ] |
| } |