| # Copyright 2019 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_staticlib.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| rustc_staticlib("bt-hci") { |
| name = "bt_hci" |
| version = "0.1.0" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//src/connectivity/bluetooth/hci/lib:serial_impl_async_wrapper", |
| "//src/lib/async-utils", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/trace/rust:trace", |
| "//src/lib/trace/rust:trace-provider", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:libc", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| public = [ "bindings.h" ] |
| |
| sources = [ |
| "src/control_plane.rs", |
| "src/error.rs", |
| "src/ffi.rs", |
| "src/ffi/uart.rs", |
| "src/lib.rs", |
| "src/log.rs", |
| "src/snoop.rs", |
| "src/test_utils.rs", |
| "src/transport.rs", |
| "src/transport/uart.rs", |
| "src/transport/uart/parse_util.rs", |
| "src/transport/uart/parser.rs", |
| "src/worker.rs", |
| ] |
| } |
| |
| static_library("serial_impl_async_wrapper") { |
| sources = [ "serial_impl_async_wrapper.cc" ] |
| |
| public_deps = [ |
| "//sdk/banjo/ddk.protocol.serialimpl.async", |
| "//src/lib/ddk", |
| ] |
| |
| configs += [ "//build/config/fuchsia:static_cpp_standard_library" ] |
| } |
| |
| unittest_package("bt-hci-lib-tests") { |
| deps = [ ":bt-hci_test" ] |
| |
| tests = [ |
| { |
| name = "bt_hci_staticlib_test" |
| environments = basic_envs |
| }, |
| ] |
| } |