| # Copyright 2017 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_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("fuchsia-framebuffer") { |
| name = "fuchsia_framebuffer" |
| version = "0.1.0" |
| edition = "2021" |
| with_unit_tests = true |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.display:fuchsia.hardware.display-rustc", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/mapped-vmo", |
| "//src/lib/shared-buffer", |
| "//src/lib/storage/fuchsia-vfs-watcher", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ |
| "src/lib.rs", |
| "src/sysmem.rs", |
| ] |
| } |
| |
| fuchsia_unittest_package("fuchsia-framebuffer-tests") { |
| deps = [ ":fuchsia-framebuffer_test" ] |
| } |
| |
| rustc_binary("box") { |
| version = "0.1.0" |
| edition = "2018" |
| with_unit_tests = true |
| source_root = "examples/box.rs" |
| deps = [ |
| "//src/lib/fuchsia-async", |
| "//src/lib/ui/fuchsia-framebuffer", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ "examples/box.rs" ] |
| } |
| |
| fuchsia_package_with_single_component("fb_box_rs") { |
| deps = [ ":box" ] |
| manifest = "meta/box.cmx" |
| } |
| |
| rustc_binary("fb_integration_test_bin") { |
| name = "fb_integration_test" |
| edition = "2018" |
| source_root = "tests/fb_integration_test.rs" |
| deps = [ |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem-rustc", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/ui/fuchsia-framebuffer", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ "tests/fb_integration_test.rs" ] |
| } |
| |
| fuchsia_unittest_package("fb_integration_test") { |
| deps = [ ":fb_integration_test_bin" ] |
| manifest = "meta/fb_integration_test.cml" |
| |
| test_specs = { |
| environments = [ nuc_env ] |
| } |
| } |
| |
| group("examples") { |
| public_deps = [ "//src/lib/ui/fuchsia-framebuffer:fb_box_rs" ] |
| } |