blob: 5bd5a7d16a70562c696d290befcb5bd67bcaf172 [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 += [
"//src/lib/zircon/rust:fuchsia-zircon",
"//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" ]
}