blob: ead723b179f057933593c51ac3b1c9d82ceaae97 [file] [log] [blame]
# 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/rust/rust_artifact.gni")
# Defines a Rust binary
#
# Parameters
#
# name
# Name of the crate as defined in its manifest file. If not specified, it is
# assumed to be the same as the target name.
#
# deps (optional)
# List of labels for Rust libraries this binary depends on.
#
# Example of usage:
#
# rust_binary("foo") {
# name = "foo_rs"
# }
template("rust_binary") {
rust_artifact(target_name) {
forward_variables_from(invoker, [
"deps",
"name",
"non_rust_deps",
"source_dir",
"native_libs",
])
type = "bin"
}
}