blob: 21fe9e6484df039709ed77e32374466e404ac60e [file] [log] [blame]
# Copyright 2020 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("async-utils") {
name = "async_utils"
edition = "2021"
with_unit_tests = true
deps = [
"//src/lib/fidl/rust/fidl",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-lock",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:once_cell",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:pin-project",
"//third_party/rust_crates:pin-utils",
"//third_party/rust_crates:slab",
"//third_party/rust_crates:thiserror",
]
test_deps = [
"//src/lib/fuchsia-async",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:futures-lite",
"//third_party/rust_crates:futures-test",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:paste",
"//third_party/rust_crates:proptest",
]
sources = [
"src/async_once/mod.rs",
"src/channel.rs",
"src/event.rs",
"src/fold.rs",
"src/futures.rs",
"src/hanging_get/client.rs",
"src/hanging_get/error.rs",
"src/hanging_get/mod.rs",
"src/hanging_get/server.rs",
"src/hanging_get/test_util.rs",
"src/lib.rs",
"src/mutex_ticket.rs",
"src/stream.rs",
"src/stream/flatten_unordered.rs",
"src/stream/future_map.rs",
"src/stream/one_or_many.rs",
"src/stream/stream_map.rs",
"src/traits.rs",
]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
fuchsia_unittest_package("async-utils-tests") {
deps = [ ":async-utils_test" ]
}
group("tests") {
testonly = true
deps = [ ":async-utils-tests" ]
}