blob: 97e0640598c1e32693fa33d63a8ac8b4438cdda3 [file]
# Copyright 2026 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.
load("//build/bazel/rules/rust:defs.bzl", "rustc_library", "rustc_test")
load("//build/bazel/rules/testing:fx_unittest_package.bzl", "fx_unittest_package")
package(default_applicable_licenses = ["//:license"])
# Use in BUILD as `//src/lib/mapped-clock:lib`.
# Use in rust code as `use mapped_clock::...`
rustc_library(
name = "lib",
srcs = ["src/lib.rs"],
crate_name = "mapped_clock",
edition = "2024",
visibility = [
"//src/lib/mapped-clock/benchmarks:__pkg__",
"//src/starnix/kernel/core:__pkg__",
],
deps = [
"//sdk/rust/zx",
"//sdk/rust/zx-status",
"//third_party/rust_crates/vendor:log",
],
)
rustc_test(
name = "mapped_clock_lib_test",
crate = ":lib",
edition = "2024",
visibility = ["//visibility:private"],
deps = ["//src/lib/fuchsia-runtime"],
)
fx_unittest_package(
name = "mapped-clock-tests",
unit_tests = [":mapped_clock_lib_test"],
visibility = ["//visibility:public"],
)