| # 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/components.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("fuchsia-bluetooth") { |
| edition = "2021" |
| with_unit_tests = true |
| |
| # TODO(armansito): Split out testing code into a separate library and move |
| # test-specific dependencies out. |
| deps = [ |
| "//sdk/fidl/fuchsia.bluetooth:fuchsia.bluetooth_rust", |
| "//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr_rust", |
| "//sdk/fidl/fuchsia.bluetooth.le:fuchsia.bluetooth.le_rust", |
| "//sdk/fidl/fuchsia.bluetooth.sys:fuchsia.bluetooth.sys_rust", |
| "//sdk/fidl/fuchsia.hardware.audio:fuchsia.hardware.audio_rust", |
| "//src/lib/diagnostics/inspect/contrib/rust", |
| "//src/lib/diagnostics/inspect/derive", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fidl_table_validation", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-sync", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:bitflags", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:pretty", |
| "//third_party/rust_crates:proptest", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:slab", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:uuid", |
| ] |
| |
| test_deps = [ |
| "//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions", |
| "//third_party/rust_crates:assert_matches", |
| ] |
| |
| sources = [ |
| "src/assigned_numbers.rs", |
| "src/assigned_numbers/constants.rs", |
| "src/assigned_numbers/ltv.rs", |
| "src/constants.rs", |
| "src/detachable_map.rs", |
| "src/error.rs", |
| "src/expectation.rs", |
| "src/expectation/asynchronous.rs", |
| "src/expectation/host_driver.rs", |
| "src/expectation/peer.rs", |
| "src/expectation/prelude.rs", |
| "src/expectation/test.rs", |
| "src/inspect.rs", |
| "src/lib.rs", |
| "src/profile.rs", |
| "src/types.rs", |
| "src/types/address.rs", |
| "src/types/bonding_data.rs", |
| "src/types/channel.rs", |
| "src/types/host_info.rs", |
| "src/types/id.rs", |
| "src/types/io_capabilities.rs", |
| "src/types/le.rs", |
| "src/types/pairing_options.rs", |
| "src/types/peer.rs", |
| "src/types/uuid.rs", |
| "src/util.rs", |
| ] |
| |
| configs -= [ "//build/config/rust/lints:allow_unused_results" ] |
| } |
| |
| fuchsia_unittest_package("bluetooth-crate-tests") { |
| deps = [ ":fuchsia-bluetooth_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":bluetooth-crate-tests" ] |
| } |