blob: 80778b377eb4f8ba5adb3a8c75f723906a5b4943 [file] [log] [blame]
# 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")
import("//src/sys/core/build/core_shard.gni")
rustc_binary("bin") {
edition = "2021"
output_name = "bt_fastpair_client"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.bluetooth.fastpair:fuchsia.bluetooth.fastpair_rust",
"//sdk/fidl/fuchsia.bluetooth.sys:fuchsia.bluetooth.sys_rust",
"//src/connectivity/bluetooth/lib/fuchsia-bluetooth",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
test_deps = [
"//sdk/fidl/fuchsia.bluetooth:fuchsia.bluetooth_rust",
"//src/connectivity/bluetooth/lib/async-helpers:async-test-helpers",
"//src/lib/async-utils",
"//src/lib/fuchsia-async",
]
sources = [ "src/main.rs" ]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
fuchsia_component("component") {
component_name = "bt-fastpair-client"
manifest = "meta/bt-fastpair-client.cml"
deps = [ ":bin" ]
}
fuchsia_package("bt-fastpair-client") {
deps = [ ":component" ]
}
# The core realm shard to be used by product integrators.
core_shard("core-shard") {
shard_file = "meta/bt-fastpair-client.core_shard.cml"
}
fuchsia_unittest_package("bt-fastpair-client-tests") {
deps = [ ":bin_test" ]
}
group("tests") {
testonly = true
deps = [ ":bt-fastpair-client-tests" ]
}