| # 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("mmio") { |
| name = "mmio" |
| edition = "2024" |
| with_unit_tests = true |
| sources = [ |
| "src/arch.rs", |
| "src/lib.rs", |
| "src/memory.rs", |
| "src/mmio.rs", |
| "src/region.rs", |
| "src/vmo.rs", |
| ] |
| configs += [ "//build/config/rust/lints:clippy_warn_all" ] |
| deps = [ |
| "//sdk/rust/zx", |
| "//sdk/rust/zx-status", |
| "//src/lib/fuchsia-runtime", |
| "//third_party/rust_crates:thiserror", |
| ] |
| test_deps = [ |
| "//src/lib/fuchsia-sync", |
| "//third_party/rust_crates:rand", |
| ] |
| } |
| |
| # Run with `fx test mmio-rust-unittests` |
| fuchsia_unittest_package("unittests") { |
| package_name = "mmio-rust-unittests" |
| deps = [ ":mmio_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":unittests" ] |
| } |