| # 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/config.gni") |
| import("//build/package.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/test_spec.gni") |
| |
| group("remote-control") { |
| testonly = true |
| |
| public_deps = [ |
| ":pkg", |
| ":tests", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":remote-control-lib-tests" ] |
| } |
| |
| rustc_library("lib") { |
| name = "remote-control" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//src/connectivity/overnet/lib/hoist", |
| "//src/developer/remote-control/service:remote-control-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:thiserror", |
| ] |
| } |
| |
| rustc_binary("bin") { |
| name = "remote-control-bin" |
| edition = "2018" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.overnet:fuchsia.overnet-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//src/connectivity/overnet/lib/hoist", |
| "//src/developer/remote-control/service:remote-control-rustc", |
| "//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:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:thiserror", |
| "//zircon/system/fidl/fuchsia-device-manager:fuchsia-device-manager-rustc", |
| ] |
| } |
| |
| test_package("remote-control-lib-tests") { |
| deps = [ ":lib_test" ] |
| |
| tests = [ |
| { |
| name = "remote_control_lib_test" |
| }, |
| ] |
| } |
| |
| config_data("autostart") { |
| for_pkg = "sysmgr" |
| sources = [ "rcs.config" ] |
| outputs = [ "rcs.config" ] |
| } |
| |
| package("pkg") { |
| package_name = "remote-control" |
| deps = [ ":bin" ] |
| |
| binaries = [ |
| { |
| name = "remote_control_bin" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/remote-control.cmx") |
| dest = "remote-control.cmx" |
| }, |
| ] |
| } |