| # Copyright 2025 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/fuchsia_unittest_package.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("ring-buffer") { |
| with_unit_tests = true |
| edition = "2021" |
| |
| visibility = [ |
| ":*", |
| "//src/diagnostics/archivist/*", |
| "//src/diagnostics/validator/*", |
| "//src/lib/diagnostics/fake-log-sink/rust/*", |
| "//src/lib/diagnostics/log/*", |
| "//src/lib/diagnostics/log/bench/*", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| deps = [ |
| "//sdk/rust/zx", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-runtime", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| test_deps = [ |
| "//src/lib/fuchsia", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] |
| } |
| |
| fuchsia_unittest_package("ring-buffer-tests") { |
| # NOTE: We need a custom manifest because we have to use the next-vdso runner. |
| manifest = "meta/ring_buffer_tests.cml" |
| deps = [ ":ring-buffer_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":ring-buffer-tests" ] |
| } |