blob: e9247e396edc8de49dc55a929f66bef7841d7e99 [file] [log] [blame]
# Copyright 2021 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_device_id"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr_rust",
"//sdk/fidl/fuchsia.bluetooth.deviceid:fuchsia.bluetooth.deviceid_rust",
"//src/connectivity/bluetooth/lib/fuchsia-bluetooth",
"//src/lib/async-utils",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:bitfield",
"//third_party/rust_crates:futures",
"//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",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:assert_matches",
]
sources = [
"src/device_id/mod.rs",
"src/device_id/server.rs",
"src/device_id/service_record.rs",
"src/device_id/token.rs",
"src/error.rs",
"src/fidl_service.rs",
"src/main.rs",
]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
fuchsia_component("component") {
component_name = "bt-device-id"
manifest = "meta/bt-device-id.cml"
deps = [ ":bin" ]
}
fuchsia_package("bt-device-id") {
deps = [ ":component" ]
}
fuchsia_unittest_package("bt-device-id-tests") {
deps = [ ":bin_test" ]
}
# The core realm shard to be used by product integrators.
core_shard("bt-device-id-core-shard") {
shard_file = "meta/bt-device-id.core_shard.cml"
}
group("tests") {
testonly = true
deps = [ ":bt-device-id-tests" ]
}