| # 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/dist/resource.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| assert(is_fuchsia, "parser is target-only") |
| |
| rustc_library("parser") { |
| name = "ext4_parser" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/storage/ext4/read-only:ext4-read-only", |
| "//src/storage/lib/vfs/rust:vfs", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//src/lib/fuchsia", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| } |
| |
| resource("test-image") { |
| sources = [ "../../read-only/test_files/nest.img" ] |
| outputs = [ "data/nest.img" ] |
| } |
| |
| fuchsia_unittest_package("tests") { |
| package_name = "storage-ext4-parser-tests" |
| deps = [ |
| ":parser_test", |
| ":test-image", |
| ] |
| } |