blob: c0e4cceada1aef9d28daca6a3b5800c9515c6f16 [file] [log] [blame]
# 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/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:bitfield",
"//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/frame/fcs.rs",
"src/rfcomm/frame/mod.rs",
"src/rfcomm/frame/mux_commands/dlc_parameter_negotiation.rs",
"src/rfcomm/frame/mux_commands/flow_control.rs",
"src/rfcomm/frame/mux_commands/mod.rs",
"src/rfcomm/frame/mux_commands/modem_status.rs",
"src/rfcomm/frame/mux_commands/non_supported.rs",
"src/rfcomm/frame/mux_commands/remote_line_status.rs",
"src/rfcomm/frame/mux_commands/remote_port_negotiation.rs",
"src/rfcomm/frame/mux_commands/test_command.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") {
executable_path = "bin/bt_rfcomm_bin_test"
deps = [ ":bin_test" ]
}
group("tests") {
testonly = true
deps = [ ":bt-rfcomm-tests" ]
}