blob: 56499961888850f6930cd68c89eccba700a53420 [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("@rules_cc//cc:cc_library.bzl", "cc_library")
load("//build/bazel/rules/rust:defs.bzl", "rustc_library")
package(default_applicable_licenses = ["//:license"])
cc_library(
name = "debug_sym_for_rust",
srcs = ["debug_sym_for_rust.cc"],
implementation_deps = [
"//src/lib/debug",
"//src/lib/debug:backtrace-request",
],
)
rustc_library(
name = "rust",
srcs = ["src/lib.rs"],
crate_name = "debug",
edition = "2024",
# Rust std needs fdio on Fuchsia. GN adds it to every Fuchsia executable,
# Bazel does not (https://fxbug.dev/42065890), so list it for the test.
test_deps = ["//sdk/lib/fdio"],
visibility = [
"//src/connectivity/network/netstack3:__pkg__",
"//src/devices/bin/driver-host:__pkg__",
"//src/starnix/kernel/core:__pkg__",
"//src/starnix/kernel/syscall_loop:__pkg__",
"//src/storage/fxfs:__pkg__",
"//src/sys/time/timekeeper/alarms:__pkg__",
],
with_unit_tests = True,
deps = [":debug_sym_for_rust"],
)