blob: 91cacb748c5474e67fd586f5f9cd850587b7edde [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 = "2018"
with_unit_tests = true
deps = [
"//src/lib/fidl/rust/fidl",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:parking_lot",
"//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:futures-test",
"//third_party/rust_crates:matches",
"//third_party/rust_crates:proptest",
]
sources = [
"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/future_map.rs",
"src/stream/stream_map.rs",
"src/traits.rs",
]
}
fuchsia_unittest_package("async-utils-tests") {
deps = [ ":async-utils_test" ]
}
group("tests") {
testonly = true
deps = [ ":async-utils-tests" ]
}