| # 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") | |
| package(default_applicable_licenses = ["//:license"]) | |
| # TODO(https://fxbug.dev/576688557): Migrate `fuchsia-framebuffer_test` and | |
| # `fuchsia-framebuffer-tests` from BUILD.gn once a Bazel rule is available for | |
| # `//src/devices/bind/fuchsia.sysmem.heap:fuchsia.sysmem.heap_rust` (generated | |
| # by GN's `_bind_library_rust` template in `//build/bind/bind.gni`). | |
| rustc_library( | |
| name = "fuchsia-framebuffer", | |
| srcs = [ | |
| "src/lib.rs", | |
| "src/sysmem.rs", | |
| ], | |
| edition = "2024", | |
| visibility = [ | |
| "//src/lib/ui/carnelian:__pkg__", | |
| "//src/starnix/modules/framebuffer:__pkg__", | |
| "//src/ui/examples/flatland-rainbow:__pkg__", | |
| "//src/virtualization/bin/vmm/device/virtio_gpu:__pkg__", | |
| ], | |
| deps = [ | |
| "//sdk/fidl/fuchsia.images2:fuchsia.images2_rust", | |
| "//sdk/fidl/fuchsia.math:fuchsia.math_rust", | |
| "//sdk/fidl/fuchsia.sysmem2:fuchsia.sysmem2_rust", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia-component", | |
| "//src/lib/fuchsia-runtime", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| ], | |
| ) |