blob: b6430d16b54d13b9bce1278449b727a1dfc33ac1 [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/dist/resource.gni")
import("//build/rust/rustc_binary.gni")
rustc_binary("bin") {
name = "bt_hid"
edition = "2021"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr_rust",
"//src/connectivity/bluetooth/lib/async-helpers",
"//src/connectivity/bluetooth/lib/fuchsia-bluetooth",
"//src/connectivity/bluetooth/lib/profile-client",
"//src/lib/async-utils",
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:bitfield",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:num-derive",
"//third_party/rust_crates:num-traits",
"//third_party/rust_crates:tracing",
]
test_deps = [
"//src/connectivity/bluetooth/lib/async-helpers:async-test-helpers",
"//src/connectivity/bluetooth/lib/profile-client:test-profile-server",
"//third_party/rust_crates:assert_matches",
]
sources = [
"src/descriptor.rs",
"src/main.rs",
"src/peer_info.rs",
"src/peer_task.rs",
"src/peers.rs",
"src/protocol.rs",
"src/sdp_data.rs",
]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
fuchsia_component("component") {
component_name = "bt-hid"
deps = [ ":bin" ]
manifest = "meta/bt-hid.cml"
}
fuchsia_package("bt-hid") {
deps = [ ":component" ]
}
fuchsia_unittest_package("bt-hid-tests") {
deps = [ ":bin_test" ]
}
group("tests") {
testonly = true
deps = [ ":bt-hid-tests" ]
}