| # 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/components.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//tools/fidl/measure-tape/measure_tape.gni") |
| |
| measure_tape("measure_fuchsia_pkg") { |
| fidls = [ "//sdk/fidl/fuchsia.pkg" ] |
| target_types = [ |
| "fuchsia.pkg/PackageIndexEntry", |
| "fuchsia.pkg/BlobId", |
| "fuchsia.pkg/BlobInfo", |
| ] |
| target_binding = "rust" |
| } |
| |
| rustc_library("fidl-fuchsia-pkg-ext") { |
| version = "0.1.0" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| ":measure_fuchsia_pkg", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.pkg:fuchsia.pkg-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-url", |
| "//src/lib/http-uri-ext", |
| "//src/lib/zircon/rust:fuchsia-zircon-status", |
| "//src/lib/zircon/rust:fuchsia-zircon-types", |
| "//src/sys/pkg/lib/fuchsia-hash", |
| "//src/sys/pkg/lib/fuchsia-pkg", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//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", |
| "//third_party/rust_crates:typed-builder", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/zerocopy", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:maplit", |
| ] |
| |
| sources = [ |
| "src/base_package_index.rs", |
| "src/cache.rs", |
| "src/errors.rs", |
| "src/lib.rs", |
| "src/measure.rs", |
| "src/repo.rs", |
| "src/serve_fidl_iterator.rs", |
| "src/types.rs", |
| ] |
| } |
| |
| fuchsia_unittest_package("fidl-fuchsia-pkg-ext-tests") { |
| deps = [ ":fidl-fuchsia-pkg-ext_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":fidl-fuchsia-pkg-ext-tests", |
| ":fidl-fuchsia-pkg-ext_test($host_toolchain)", |
| ] |
| } |