blob: 2fee45612fbe47f4826935d2cdf4ad0a61d63f2b [file] [log] [blame]
# 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/rust/rustc_library.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
rustc_library("fuchsia-async") {
name = "fuchsia_async"
edition = "2018"
version = "0.1.0"
with_unit_tests = true
deps = [
"//src/lib/fuchsia-async-macro",
"//src/lib/fuchsia-system-alloc",
"//src/lib/zircon/rust:fuchsia-zircon-status",
"//third_party/rust_crates:crossbeam",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:libc",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:pin-utils",
"//third_party/rust_crates:socket2",
]
if (is_fuchsia) {
deps += [ "//src/lib/zircon/rust:fuchsia-zircon" ]
} else {
deps += [
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:slab",
"//third_party/rust_crates:smol",
]
}
test_deps = [ "//third_party/rust_crates:futures-test" ]
}
test_package("fuchsia-async-tests") {
deps = [ ":fuchsia-async_test" ]
tests = [
{
name = "fuchsia_async_lib_test"
environments = [ emu_env ]
},
]
}
group("tests") {
testonly = true
deps = [
":fuchsia-async-tests",
":fuchsia-async_test($host_toolchain)",
]
}