blob: 3443da72f06cc48b61fabe93df5e1abcd9d33201 [file] [log] [blame]
# Copyright 2024 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/host.gni")
import("//build/rust/rustc_binary.gni")
if (is_host) {
rustc_binary("bin") {
name = "pkgstats"
edition = "2021"
configs += [ "//build/config:optimize_speed" ]
with_unit_tests = true
test_environments = [ host_env ]
deps = [
"//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust",
"//src/lib/fidl/rust/fidl",
"//src/sys/pkg/lib/far/rust:fuchsia-archive",
"//src/sys/pkg/lib/fuchsia-pkg",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:handlebars",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:rayon",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
]
data_deps = [ "debugdump:host($host_toolchain)" ]
inputs = [
"templates/base_template.html.hbs",
"templates/content.html.hbs",
"templates/index.html.hbs",
"templates/style.css",
"templates/package.html.hbs",
]
source_root = "src/main.rs"
sources = [ "src/main.rs" ]
}
install_host_tools("host") {
deps = [ ":bin" ]
outputs = [ "pkgstats" ]
}
}
group("pkgstats") {
deps = [ ":host($host_toolchain)" ]
}
group("tests") {
testonly = true
deps = [ ":bin_test($host_toolchain)" ]
}