blob: a8242d02173d2c6b0886766b7c9db8d8ecadb49a [file] [log] [blame]
# Copyright 2022 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/dist/component_manifest_resources.gni")
import("//build/rust/rustc_binary.gni")
group("tests") {
testonly = true
deps = [ ":tpm_agent_unittests" ]
}
rustc_binary("bin") {
edition = "2021"
output_name = "tpm_agent"
with_unit_tests = true
configs += [ "//build/config/rust:bootfs" ]
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.tpm:fuchsia.tpm_rust",
"//src/lib/diagnostics/inspect/runtime/rust",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-fs",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/security/lib/fuchsia-tpm-protocol",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
sources = [
"src/discovery.rs",
"src/main.rs",
]
}
component_manifest_resources("manifest") {
sources = [ "meta/tpm_agent.cml" ]
}
fuchsia_component("component") {
component_name = "tpm_agent"
manifest = "meta/tpm_agent.cml"
deps = [ ":bin" ]
}
fuchsia_package("tpm_agent") {
package_name = "tpm_agent"
deps = [ ":component" ]
}
group("bootfs") {
deps = [
":bin",
":manifest",
]
}
fuchsia_unittest_package("tpm_agent_unittests") {
deps = [ ":bin_test" ]
}