| # 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"]) | |
| test_suite( | |
| name = "tests", | |
| tests = [":driver-manager-node-unittests"], | |
| visibility = ["//src/devices/bin/driver_manager_rust:__pkg__"], | |
| ) | |
| rustc_library( | |
| name = "driver_manager_node", | |
| srcs = [ | |
| "src/add.rs", | |
| "src/binding.rs", | |
| "src/composite.rs", | |
| "src/devfs.rs", | |
| "src/lib.rs", | |
| "src/node.rs", | |
| "src/node_manager.rs", | |
| "src/serve.rs", | |
| "src/shutdown.rs", | |
| "src/start.rs", | |
| "src/types.rs", | |
| ], | |
| edition = "2024", | |
| lint_config = "//build/config/rust/lints:clippy_warn_all", | |
| proc_macro_deps = [ | |
| "//third_party/rust_crates/vendor:async-trait", | |
| ], | |
| visibility = [ | |
| "//src/devices/bin/driver_manager_rust/bind:__pkg__", | |
| "//src/devices/bin/driver_manager_rust/composite:__pkg__", | |
| "//src/devices/bin/driver_manager_rust/core:__pkg__", | |
| "//src/devices/bin/driver_manager_rust/development:__pkg__", | |
| ], | |
| deps = [ | |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", | |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", | |
| "//sdk/fidl/fuchsia.component.runner:fuchsia.component.runner_rust", | |
| "//sdk/fidl/fuchsia.component.sandbox:fuchsia.component.sandbox_rust", | |
| "//sdk/fidl/fuchsia.data:fuchsia.data_rust", | |
| "//sdk/fidl/fuchsia.device.fs:fuchsia.device.fs_rust", | |
| "//sdk/fidl/fuchsia.device:fuchsia.device_rust", | |
| "//sdk/fidl/fuchsia.driver.development:fuchsia.driver.development_rust", | |
| "//sdk/fidl/fuchsia.driver.framework:fuchsia.driver.framework_rust", | |
| "//sdk/fidl/fuchsia.driver.host:fuchsia.driver.host_rust", | |
| "//sdk/fidl/fuchsia.process:fuchsia.process_rust", | |
| "//sdk/rust/zx", | |
| "//src/devices/bin/driver_manager_rust/devfs:driver_manager_devfs", | |
| "//src/devices/bin/driver_manager_rust/driver_host:driver_manager_driver_host", | |
| "//src/devices/bin/driver_manager_rust/shutdown:driver_manager_shutdown", | |
| "//src/devices/bin/driver_manager_rust/types:driver_manager_types", | |
| "//src/devices/bin/driver_manager_rust/utils:driver_manager_utils", | |
| "//src/devices/bind/fuchsia:fuchsia_rust", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia-async", | |
| "//third_party/rust_crates/vendor:flyweights", | |
| "//third_party/rust_crates/vendor:futures", | |
| "//third_party/rust_crates/vendor:log", | |
| "//third_party/rust_crates/vendor:phf", | |
| "//third_party/rust_crates/vendor:rand", | |
| ], | |
| ) | |
| rustc_test( | |
| name = "driver_manager_node_test", | |
| crate = ":driver_manager_node", | |
| lint_config = "//build/config/rust/lints:clippy_warn_all", | |
| target_compatible_with = ["@platforms//os:fuchsia"], | |
| ) | |
| fx_unittest_package( | |
| name = "driver-manager-node-unittests", | |
| unit_tests = [":driver_manager_node_test"], | |
| ) |