| # Copyright 2020 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/rust/rustc_binary.gni") |
| import("//src/sys/build/components.gni") |
| |
| rustc_binary("bin") { |
| output_name = "bt_rfcomm" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.bluetooth:fuchsia.bluetooth-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr-rustc", |
| "//src/connectivity/bluetooth/lib/bt-rfcomm", |
| "//src/connectivity/bluetooth/lib/fuchsia-bluetooth", |
| "//src/connectivity/bluetooth/lib/packet-encoding", |
| "//src/lib/async-utils", |
| "//src/lib/diagnostics/inspect/contrib/rust", |
| "//src/lib/diagnostics/inspect/derive", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:slab", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ "//third_party/rust_crates:matches" ] |
| |
| sources = [ |
| "src/main.rs", |
| "src/profile.rs", |
| "src/profile_registrar.rs", |
| "src/rfcomm/inspect.rs", |
| "src/rfcomm/mod.rs", |
| "src/rfcomm/server.rs", |
| "src/rfcomm/session/channel.rs", |
| "src/rfcomm/session/mod.rs", |
| "src/rfcomm/session/multiplexer.rs", |
| "src/rfcomm/test_util.rs", |
| "src/rfcomm/types.rs", |
| "src/types.rs", |
| ] |
| } |
| |
| fuchsia_component("component") { |
| component_name = "bt-rfcomm" |
| manifest = "meta/bt-rfcomm.cmx" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("bt-rfcomm") { |
| deps = [ ":component" ] |
| } |
| |
| fuchsia_unittest_package("bt-rfcomm-tests") { |
| deps = [ ":bin_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":bt-rfcomm-tests" ] |
| } |