| # Copyright 2018 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/package.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//src/sys/build/components.gni") |
| import("//tools/fidl/measure-tape/measure_tape.gni") |
| |
| measure_tape("measure_fuchsia_pkg_index_entry") { |
| fidls = [ "//sdk/fidl/fuchsia.pkg" ] |
| target_type = "fuchsia.pkg/PackageIndexEntry" |
| target_binding = "rust" |
| } |
| |
| measure_tape("measure_fuchsia_pkg_blob_id") { |
| fidls = [ "//sdk/fidl/fuchsia.pkg" ] |
| target_type = "fuchsia.pkg/BlobId" |
| target_binding = "rust" |
| } |
| |
| measure_tape("measure_fuchsia_pkg_blob_info") { |
| fidls = [ "//sdk/fidl/fuchsia.pkg" ] |
| target_type = "fuchsia.pkg/BlobInfo" |
| target_binding = "rust" |
| } |
| |
| rustc_library("fidl-fuchsia-pkg-ext") { |
| version = "0.1.0" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| ":measure_fuchsia_pkg_blob_id", |
| ":measure_fuchsia_pkg_blob_info", |
| ":measure_fuchsia_pkg_index_entry", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fuchsia-url", |
| "//src/lib/http-uri-ext", |
| "//src/sys/pkg/lib/fuchsia-merkle", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:hex", |
| "//third_party/rust_crates:http", |
| "//third_party/rust_crates:proptest", |
| "//third_party/rust_crates:proptest-derive", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/zerocopy", |
| "//third_party/rust_crates:matches", |
| ] |
| |
| sources = [ |
| "src/errors.rs", |
| "src/lib.rs", |
| "src/measure.rs", |
| "src/repo.rs", |
| "src/types.rs", |
| ] |
| } |
| |
| fuchsia_unittest_package("fidl-fuchsia-pkg-ext-tests") { |
| manifest = "meta/fidl-fuchsia-pkg-ext-tests.cmx" |
| deps = [ ":fidl-fuchsia-pkg-ext_test" ] |
| test_specs = { |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":fidl-fuchsia-pkg-ext-tests" ] |
| } |