blob: 341e51047b6d4121daca5497183fa262dd64a920 [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 lua_binary}
/***/
{template .soyweb}
{call buck.page}
{param title: 'lua_binary()' /}
{param navid: 'rule_lua_binary' /}
{param prettify: true /}
{param description}
A rule that is used to build a executable that uses Lua sources
from all transitive lua_library() dependencies.
{/param}
{param content}
{call buck.rule}
{param status: 'UNFROZEN' /}
{param overview}
A <code>lua_library()</code> rule is used to group together Lua sources
to be packaged into a top-level {call buck.lua_binary /} rule.
{/param}
{param args}
{call buck.name_arg /}
{call buck.arg}
{param name: 'main_module' /}
{param desc}
The module which serves as the entry point for this rule.
{/param}
{/call}
{call buck.arg}
{param name: 'deps' /}
{param default : '[]' /}
{param desc}
{call buck.lua_library /} rules to this binary will access.
{/param}
{/call}
{/param} // close args
{param examples}
{literal}<pre class="prettyprint lang-py">
lua_binary(
name = 'tailer',
main_module = 'tailer',
deps = [
':tailerutils',
],
)
lua_library(
name = 'tailerutils',
srcs = glob(['*.lua']),
)
</pre>{/literal}
{/param}
{/call} // close buck.rule
{/param}
{/call}
{/template}