| # Copyright 2021 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") |
| |
| rustc_binary("lifecycle_example") { |
| edition = "2021" |
| output_name = "lifecycle_example_rust" |
| source_root = "src/lifecycle.rs" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.process.lifecycle:fuchsia.process.lifecycle_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:futures-util", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| sources = [ "src/lifecycle.rs" ] |
| } |
| |
| rustc_binary("lifecycle_manager") { |
| edition = "2021" |
| output_name = "lifecycle_manager_rust" |
| source_root = "src/manager.rs" |
| |
| deps = [ |
| "//examples/components/routing/fidl:echo_rust", |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| sources = [ "src/manager.rs" ] |
| } |
| |
| fuchsia_package_with_single_component("lifecycle") { |
| # Since `//examples/components/lifecycle/README.md` includes instructions to |
| # use `ffx component run` to launch one of two versions of `lifecycle`, the |
| # two versions need unique package names (`lifecycle_rust` in this case). |
| component_name = "default" |
| package_name = "lifecycle_rust" |
| manifest = "meta/lifecycle.cml" |
| deps = [ ":lifecycle_example" ] |
| } |
| |
| fuchsia_component("manager-component") { |
| component_name = "lifecycle_manager" |
| manifest = "meta/manager.cml" |
| deps = [ ":lifecycle_manager" ] |
| } |