| # Copyright 2024 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("builtins") { |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.kernel:fuchsia.kernel_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/lib/zircon/rust/fuchsia-zircon-status", |
| "//src/sys/lib/cm_types", |
| "//src/sys/lib/fuchsia-zbi", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:zerocopy", |
| ] |
| |
| sources = [ |
| "src/arguments.rs", |
| "src/cpu_resource.rs", |
| "src/debug_resource.rs", |
| "src/debuglog_resource.rs", |
| "src/energy_info_resource.rs", |
| "src/factory_items.rs", |
| "src/framebuffer_resource.rs", |
| "src/hypervisor_resource.rs", |
| "src/info_resource.rs", |
| "src/iommu_resource.rs", |
| "src/ioport_resource.rs", |
| "src/irq_resource.rs", |
| "src/items.rs", |
| "src/kernel_stats.rs", |
| "src/lib.rs", |
| "src/mexec_resource.rs", |
| "src/mmio_resource.rs", |
| "src/msi_resource.rs", |
| "src/power_resource.rs", |
| "src/profile_resource.rs", |
| "src/root_job.rs", |
| "src/smc_resource.rs", |
| "src/vmex_resource.rs", |
| ] |
| } |
| |
| fuchsia_test_component("test_component") { |
| deps = [ ":builtins_test" ] |
| component_name = "builtins_tests" |
| manifest = "meta/test.cml" |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("tests") { |
| package_name = "builtins_tests" |
| test_components = [ ":test_component" ] |
| } |