| # 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/components.gni") |
| import("//build/components/fuchsia_unittest_package.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| group("rust") { |
| public_deps = [ ":gpt" ] |
| } |
| |
| rustc_library("gpt") { |
| edition = "2024" |
| deps = [ |
| "//sdk/rust/zx", |
| "//src/lib/fuchsia-sync", |
| "//src/storage/lib/block_client/rust", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:crc", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:uuid", |
| "//third_party/rust_crates:zerocopy", |
| ] |
| test_deps = [ |
| "//sdk/fidl/fuchsia.storage.block:fuchsia.storage.block_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/storage/gpt:golden_images", |
| "//src/storage/lib/block_server", |
| "//src/storage/lib/block_server:vmo_backed_block_server", |
| ] |
| sources = [ |
| "src/format.rs", |
| "src/lib.rs", |
| ] |
| with_unit_tests = true |
| } |
| |
| fuchsia_unittest_package("gpt-rust-test") { |
| deps = [ ":gpt_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":gpt-rust-test" ] |
| } |