| # Copyright 2026 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/assembly/bootfs_files_for_assembly.gni") |
| import("//build/components.gni") |
| import("//build/rust/rustc_binary.gni") |
| |
| bootfs_files_for_assembly("bootfs") { |
| deps = [ ":bin" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":identify-host-tests" ] |
| } |
| |
| rustc_binary("bin") { |
| output_name = "identify-host" |
| edition = "2024" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/sys/lib/component_debug", |
| "//src/sys/lib/moniker", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ |
| "src/args.rs", |
| "src/format.rs", |
| "src/main.rs", |
| ] |
| } |
| |
| fuchsia_component("component") { |
| component_name = "identify-host" |
| manifest = "meta/identify_host.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("package") { |
| package_name = "identify-host" |
| deps = [ ":component" ] |
| } |
| |
| fuchsia_unittest_package("identify-host-tests") { |
| deps = [ ":bin_test" ] |
| } |