Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba517405 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Make single rust target

Move hal, hci, link, main to stack/
Move hci::custom_types to packet/, since main target already depends on
packet.
facade_proto doesn't need hci/custom_types.

Test: compile on android and chromeos
Bug: 191711152
Tag: #gd-refactor
Change-Id: I8c25c1fcc61bfe8f93d9ee9bbe1f53986797d863
parent 2871a6be
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -632,7 +632,6 @@ rust_library {
        "libbytes",
        "libnum_traits",
        "libthiserror",
        "libbt_hci_custom_types",
        "liblog_rust",
    ],
}
@@ -648,7 +647,6 @@ rust_test_host {
        "libbytes",
        "libnum_traits",
        "libthiserror",
        "libbt_hci_custom_types",
        "liblog_rust",
    ],
}
+1 −3
Original line number Diff line number Diff line
@@ -14,15 +14,13 @@ rust_library {
    srcs: ["src/lib.rs"],
    edition: "2018",
    rustlibs: [
      "libbt_hal",
      "libbt_hci",
      "libbluetooth_rs",
      "libbt_facade_proto",
      "libfutures",
      "libgrpcio",
      "libprotobuf",
      "libtokio",
      "libgddi",
      "libbt_main",
      "liblog_rust",
    ],
}
+4 −4
Original line number Diff line number Diff line
//! Bluetooth testing root facade service

use bluetooth_rs::hal::facade::HciHalFacadeService;
use bluetooth_rs::hci::controller_facade::ControllerFacadeService;
use bluetooth_rs::hci::facade::HciFacadeService;
use bluetooth_rs::Stack;
use bt_facade_proto::rootservice::*;
use bt_facade_proto::rootservice_grpc::{create_root_facade, RootFacade};
use bt_hal::facade::HciHalFacadeService;
use bt_hci::controller_facade::ControllerFacadeService;
use bt_hci::facade::HciFacadeService;
use bt_main::Stack;
use futures::executor::block_on;
use grpcio::*;
use std::sync::Arc;
+0 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ edition = "2018"
build = "build.rs"

[dependencies]
bt_hci_custom_types = { path = "../hci/custom_types" }
futures = "*"
grpcio = "*"
protobuf = "*"

system/gd/rust/hal/BUILD.gn

deleted100644 → 0
+0 −27
Original line number Diff line number Diff line
#
#  Copyright 2021 Google, Inc.
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at:
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

rust_library("libbt_hal") {
  crate_name = "bt_hal"

  sources = [
    "src/lib.rs"
  ]

  configs = [
    "//bt/gd/rust/shim:rust_libs",
    "//bt/gd:rust_defaults",
  ]
}
Loading