blob: 96594dd5c7a674b5bb2521ca20262f102f81efbb [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:rustc_library.bzl", "rustc_library")
load("//build/bazel/rules/rust:rustc_test.bzl", "rustc_test")
load(
"//build/bazel/rules/testing:fx_unittest_package.bzl",
"fx_unittest_package",
)
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "server",
srcs = [
"src/attribution_server.rs",
"src/lib.rs",
],
crate_name = "attribution_server",
edition = "2024",
visibility = [
"//examples/components/runner/colocated:__pkg__",
"//src/devices/bin/driver_manager_rust/core:__pkg__",
"//src/performance/memory/attribution/monitor:__pkg__",
"//src/starnix/kernel/core:__pkg__",
"//src/starnix/kernel/runner:__pkg__",
"//src/sys/lib/elf_runner:__pkg__",
],
deps = [
"//sdk/fidl/fuchsia.memory.attribution:fuchsia.memory.attribution_rust",
"//sdk/fidl/fuchsia.memory.attribution:measure_tape_for_attribution",
"//sdk/rust/zx",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-sync",
"//third_party/rust_crates/vendor:log",
"//third_party/rust_crates/vendor:thiserror",
],
)
# @bazel2gn:skip
rustc_test(
name = "server_test",
crate = ":server",
edition = "2024",
deps = [
"//src/lib/fuchsia-async",
"//third_party/rust_crates/vendor:assert_matches",
"//third_party/rust_crates/vendor:futures",
],
)
# @bazel2gn:skip
fx_unittest_package(
name = "tests",
package_name = "attribution-server-tests",
unit_tests = [":server_test"],
)