| # Copyright 2023 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. |
| |
| assert(is_fuchsia, "These targets are only compiled in the fuchsia toolchain.") |
| |
| import("//build/components.gni") |
| import("//build/rust/rustc_binary.gni") |
| |
| group("colocated") { |
| testonly = true |
| |
| deps = [ |
| ":colocated-runner", |
| ":colocated-runner-example", |
| ] |
| } |
| |
| rustc_binary("bin") { |
| name = "colocated_runner" |
| with_unit_tests = true |
| edition = "2021" |
| |
| deps = [ |
| "//examples/components/runner/colocated/fidl:colocated_rust", |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//sdk/fidl/fuchsia.component.runner:fuchsia.component.runner_rust", |
| "//sdk/fidl/fuchsia.memory.attribution:fuchsia.memory.attribution_rust", |
| "//sdk/fidl/fuchsia.process:fuchsia.process_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/fuchsia-sync", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/performance/memory/attribution", |
| "//src/sys/lib/runner", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-lock", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:scopeguard", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-fs", |
| ] |
| |
| sources = [ |
| "src/main.rs", |
| "src/program.rs", |
| ] |
| } |
| |
| fuchsia_component("colocated-runner") { |
| component_name = "colocated-runner" |
| manifest = "meta/colocated-runner.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_component("colocated-runner-example-realm") { |
| component_name = "colocated-runner-example" |
| manifest = "meta/colocated-runner-example.cml" |
| } |
| |
| fuchsia_component("colocated-component") { |
| component_name = "colocated-component" |
| manifest = "meta/colocated-component.cml" |
| } |
| |
| fuchsia_package("colocated-runner-example") { |
| deps = [ |
| ":colocated-component", |
| ":colocated-runner", |
| ":colocated-runner-example-realm", |
| ] |
| } |
| |
| fuchsia_unittest_package("colocated-runner-unittests") { |
| deps = [ |
| ":bin_test", |
| ":colocated-component", |
| ] |
| } |
| |
| group("hermetic_tests") { |
| testonly = true |
| deps = [ |
| ":colocated-runner-unittests", |
| "integration_tests", |
| ] |
| } |