| # Copyright 2019 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/package.gni") |
| import("//build/rust/rustc_binary.gni") |
| |
| rustc_binary("hello_world_bin") { |
| source_root = "src/hello_world.rs" |
| name = "hello_world" |
| edition = "2018" |
| } |
| |
| rustc_binary("ls_root_pkg_bin") { |
| source_root = "src/ls_root_pkg.rs" |
| name = "ls_root_pkg" |
| edition = "2018" |
| } |
| |
| rustc_binary("echo_args_bin") { |
| source_root = "src/echo_args.rs" |
| name = "echo_args" |
| edition = "2018" |
| } |
| |
| package("components_basic_example") { |
| deps = [ |
| ":hello_world_bin", |
| ":ls_root_pkg_bin", |
| ":echo_args_bin", |
| ] |
| |
| binaries = [ |
| { |
| name = "hello_world" |
| }, |
| { |
| name = "ls_root_pkg" |
| }, |
| { |
| name = "echo_args" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/hello_world.cml") |
| dest = "hello_world.cm" |
| }, |
| { |
| path = rebase_path("meta/ls_root_pkg.cml") |
| dest = "ls_root_pkg.cm" |
| }, |
| { |
| path = rebase_path("meta/echo_args.cml") |
| dest = "echo_args.cm" |
| }, |
| ] |
| } |