# Copyright 2020 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/config.gni")
import("//build/rust/rustc_library.gni")
import("//src/sys/core/build/core_shard.gni")

rustc_library("lib") {
  name = "persistence"
  edition = "2021"
  with_unit_tests = true

  visibility = [
    "//src/diagnostics/launcher/*",
    "//src/diagnostics/persistence/*",
  ]

  deps = [
    ":persistence-component-config",
    "//src/diagnostics/lib/inspect-fetcher",
    "//src/diagnostics/lib/persistence:lib",
    "//src/diagnostics/persistence/fidl:persist_rust",
    "//src/lib/diagnostics/inspect/runtime/rust",
    "//src/lib/diagnostics/inspect/rust",
    "//src/lib/fuchsia-async",
    "//src/lib/fuchsia-component",
    "//src/lib/zircon/rust:fuchsia-zircon",
    "//third_party/rust_crates:anyhow",
    "//third_party/rust_crates:argh",
    "//third_party/rust_crates:chrono",
    "//third_party/rust_crates:futures",
    "//third_party/rust_crates:glob",
    "//third_party/rust_crates:parking_lot",
    "//third_party/rust_crates:serde",
    "//third_party/rust_crates:serde_json",
    "//third_party/rust_crates:thiserror",
    "//third_party/rust_crates:tracing",
  ]

  sources = [
    "src/constants.rs",
    "src/file_handler.rs",
    "src/inspect_server.rs",
    "src/lib.rs",
    "src/persist_server.rs",
  ]

  test_deps = [
    "//src/lib/fuchsia",
    "//third_party/rust_crates:serde_json5",
    "//third_party/rust_crates:test-case",
  ]
}

# Rules defining the Persistence component.
fuchsia_component_manifest("persistence-manifest") {
  component_name = "diagnostics-persistence"
  manifest = "meta/persistence-for-production.cml"
}

fuchsia_structured_config_rust_lib("persistence-component-config") {
  cm_label = ":persistence-manifest"
}

fuchsia_component("diagnostics-persistence-component") {
  cm_label = ":persistence-manifest"
  deps = [
    "//src/diagnostics/config/persistence",
    "//src/diagnostics/launcher:bin",
  ]
}

fuchsia_structured_config_values("production-structured-config") {
  values_source = "structured-config/production.json5"
  cm_label = ":persistence-manifest"
}

fuchsia_package("diagnostics-persistence") {
  deps = [
    ":diagnostics-persistence-component",
    ":production-structured-config",
  ]
}

fuchsia_unittest_package("diagnostics-persistence-unittests") {
  manifest = "meta/diagnostics-persistence-unittests.cml"
  deps = [ ":lib_test" ]
}

core_shard("core_shard") {
  shard_file = "meta/diagnostics-persistence.core_shard.cml"
}

group("tests") {
  testonly = true
  deps = [
    ":diagnostics-persistence-unittests",
    "tests:tests",
  ]
}
