blob: dd283a67ab7929344ec7416449598472a94f0c0d [file] [log] [blame]
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{namespace rust_binary}
/***/
{template .soyweb}
{call buck.page}
{param title: 'rust_binary()' /}
{param navid: 'rule_rust_binary' /}
{param prettify: true /}
{param description}
A rust_binary() rule builds a native Rust executable.
{/param}
{param content}
{call buck.rule}
{param status: 'UNFROZEN' /}
{param overview}
<p>
A rust_binary() rule builds a native executable from the supplied set of Rust source files
and dependencies.
</p>
<p>
{call rust_common.check_flavor /}
</p>
<p>
{call rust_common.supported_language_version /}
</p>
{/param}
{param args}
{call buck.name_arg /}
{call rust_common.srcs_arg /}
{call rust_common.mapped_srcs_arg /}
{call rust_common.deps_arg /}
{call rust_common.named_deps_arg /}
{call buck.platform_deps_arg /}
{call rust_common.edition_arg /}
{call rust_common.features_arg /}
{call rust_common.rustc_flags_arg /}
{call rust_common.linker_flags_arg /}
{call rust_common.env_arg /}
{call rust_common.crate /}
{call rust_common.crate_root /}
{call native_common.link_style /}
{call buck.arg}
{param name: 'rpath' /}
{param default : 'true' /}
{param desc}
Set the "rpath" in the executable when using a shared link style.
{/param}
{/call}
{call buck.tests_arg /}
{/param} // close args
{param examples}
{call rust_common.more_examples /}
{literal}<pre class="prettyprint lang-py">
rust_binary(
name='greet',
srcs=[
'greet.rs',
],
deps=[
':greeting',
],
)
rust_library(
name='greeting',
srcs=[
'greeting.rs',
],
deps=[
':join',
],
)
rust_library(
name='join',
srcs=[
'join.rs',
],
)
</pre>{/literal}
{/param}
{/call} // close buck.rule
{/param}
{/call}
{/template}