blob: cedab72adf6ed00f5345f71c41fdac417aa47d6a [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_library.gni")
rustc_library("bt-rfcomm") {
edition = "2021"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr_rust",
"//src/connectivity/bluetooth/lib/fuchsia-bluetooth",
"//src/connectivity/bluetooth/lib/packet-encoding",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:bitfield",
"//third_party/rust_crates:thiserror",
]
test_deps = [ "//third_party/rust_crates:assert_matches" ]
sources = [
"src/dlci.rs",
"src/error.rs",
"src/frame/command_response.rs",
"src/frame/error.rs",
"src/frame/fcs.rs",
"src/frame/field.rs",
"src/frame/mod.rs",
"src/frame/mux_commands/dlc_parameter_negotiation.rs",
"src/frame/mux_commands/flow_control.rs",
"src/frame/mux_commands/mod.rs",
"src/frame/mux_commands/modem_status.rs",
"src/frame/mux_commands/non_supported.rs",
"src/frame/mux_commands/remote_line_status.rs",
"src/frame/mux_commands/remote_port_negotiation.rs",
"src/frame/mux_commands/test_command.rs",
"src/lib.rs",
"src/profile.rs",
]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
fuchsia_unittest_package("bt-rfcomm-lib-tests") {
deps = [ ":bt-rfcomm_test" ]
}
group("tests") {
testonly = true
deps = [ ":bt-rfcomm-lib-tests" ]
}