| # 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.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("pdev") { |
| name = "pdev" |
| edition = "2024" |
| with_unit_tests = true |
| sources = [ "src/lib.rs" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_rust", |
| "//sdk/lib/driver/mmio/rust:mmio", |
| "//sdk/rust/zx-status", |
| "//src/lib/fidl/rust/fidl", |
| "//third_party/rust_crates:log", |
| ] |
| test_deps = [ |
| "//sdk/lib/driver/platform-device/rust/fidl:test.metadata_rust", |
| "//sdk/rust/zx", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:futures-util", |
| ] |
| } |
| |
| # Run with `fx test pdev-rust-unittests` |
| fuchsia_unittest_package("unittests") { |
| package_name = "pdev-rust-unittests" |
| deps = [ ":pdev_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":unittests" ] |
| } |