blob: 003272bceebdbce2c2152a3a6eb869a7016a6371 [file] [log] [blame]
# 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/components.gni")
import("//build/rust/rustc_library.gni")
group("rust") {
public_deps = [ ":lib" ]
}
group("tests") {
testonly = true
deps = [ ":diagnostics-data-tests" ]
}
rustc_library("lib") {
edition = "2021"
name = "diagnostics_data"
with_unit_tests = true
sources = [ "src/lib.rs" ]
deps = [
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust",
"//src/lib/diagnostics/hierarchy/rust",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:serde",
]
test_deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates:pretty_assertions",
"//third_party/rust_crates:serde_json",
]
if (is_fuchsia) {
deps += [
"//sdk/fidl/fuchsia.logger:fuchsia.logger_rust",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:thiserror",
]
sources += [ "src/logs_legacy.rs" ]
}
}
fuchsia_unittest_package("diagnostics-data-tests") {
deps = [ ":lib_test" ]
}