| # Copyright 2021 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") |
| |
| rustc_library("lib") { |
| name = "inspect_format" |
| version = "0.1.0" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//src/lib/diagnostics/hierarchy/rust", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:num-derive", |
| "//third_party/rust_crates:num-traits", |
| "//third_party/rust_crates:paste", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| if (is_fuchsia) { |
| deps += [ |
| "//sdk/rust/zx", |
| "//src/lib/fuchsia-runtime", |
| ] |
| } |
| |
| test_deps = [ "//src/lib/fuchsia" ] |
| |
| sources = [ |
| "src/bitfields.rs", |
| "src/block.rs", |
| "src/block_index.rs", |
| "src/block_type.rs", |
| "src/constants.rs", |
| "src/container/common.rs", |
| "src/container/fuchsia.rs", |
| "src/container/mod.rs", |
| "src/container/portable.rs", |
| "src/error.rs", |
| "src/lib.rs", |
| "src/utils.rs", |
| ] |
| |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] |
| } |
| |
| fuchsia_unittest_package("inspect-format-tests") { |
| deps = [ ":lib_test" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("inspect-format-host-tests") { |
| testonly = true |
| deps = [ ":lib_test($host_toolchain)" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":inspect-format-host-tests", |
| ":inspect-format-tests", |
| ] |
| } |
| |
| group("rust") { |
| public_deps = [ ":lib" ] |
| } |