| # Copyright 2022 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_binary.gni") |
| |
| rustc_binary("bin") { |
| edition = "2021" |
| output_name = "bt_fastpair_provider" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.bluetooth.gatt2:fuchsia.bluetooth.gatt2-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.le:fuchsia.bluetooth.le-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.sys:fuchsia.bluetooth.sys-rustc", |
| "//src/connectivity/bluetooth/lib/async-helpers", |
| "//src/connectivity/bluetooth/lib/fuchsia-bluetooth", |
| "//src/connectivity/bluetooth/lib/packet-encoding", |
| "//src/lib/async-utils", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:aes", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:bitfield", |
| "//third_party/rust_crates:elliptic-curve", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:lru-cache", |
| "//third_party/rust_crates:p256", |
| "//third_party/rust_crates:sha2", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ |
| "//src/connectivity/bluetooth/lib/async-helpers:async-test-helpers", |
| "//src/lib/async-utils", |
| "//third_party/rust_crates:assert_matches", |
| ] |
| |
| sources = [ |
| "src/advertisement/bloom_filter.rs", |
| "src/advertisement/low_energy_advertiser.rs", |
| "src/advertisement/mod.rs", |
| "src/config.rs", |
| "src/gatt_service.rs", |
| "src/host_watcher.rs", |
| "src/main.rs", |
| "src/pairing.rs", |
| "src/provider.rs", |
| "src/types/error.rs", |
| "src/types/keys.rs", |
| "src/types/mod.rs", |
| "src/types/packets.rs", |
| ] |
| |
| configs -= [ "//build/config/rust:allow_unused_results" ] |
| } |
| |
| fuchsia_component("component") { |
| component_name = "bt-fastpair-provider" |
| manifest = "meta/bt-fastpair-provider.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("bt-fastpair-provider") { |
| deps = [ ":component" ] |
| } |
| |
| fuchsia_unittest_package("bt-fastpair-provider-tests") { |
| deps = [ ":bin_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":bt-fastpair-provider-tests" ] |
| } |