blob: 2eea39bbf832ddf81b4f463ed1f7b875f22cb121 [file] [log] [blame]
# Copyright 2023 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("fuchsia-sync") {
name = "fuchsia_sync"
edition = "2021"
version = "0.1.0"
with_unit_tests = true
deps = []
non_rust_deps = []
test_deps = []
if (is_fuchsia) {
deps += [
"//sdk/rust/zx",
"//third_party/rust_crates:lock_api",
]
test_deps += [ "//third_party/rust_crates:crossbeam" ]
non_rust_deps += [ "//zircon/system/ulib/sync" ]
} else {
deps += [ "//third_party/rust_crates:parking_lot" ]
}
sources = [
"src/condvar.rs",
"src/lib.rs",
"src/mutex.rs",
"src/rwlock.rs",
]
}
fuchsia_unittest_package("fuchsia-sync-tests") {
deps = [ ":fuchsia-sync_test" ]
}
group("tests") {
testonly = true
deps = [ ":fuchsia-sync-tests" ]
}