lua_library()
This is liable to change in the future.
Alua_library()
rule is used to group together Lua sources to be packaged into a top-level lua_binary
rule.Arguments
name
(required) #The short name for this build target.
srcs
(defaults to[]
) #The set of
.lua
files included in this library.base_module
(defaults toNone
) #The package for which the given specified sources and resources should reside in their final location in the top-level binary. If unset, the project relative directory that houses the BUCK file is used.
deps
(defaults to[]
) #Other
lua_library()
rules which listsrcs
from which this rule imports modules.visibility
(defaults to[]
) #List of build target patterns that identify the build rules that can include this rule as a dependency, for example, by listing it in their
deps
orexported_deps
attributes. For more information, see visibility.licenses
(defaults to[]
) #Set of license files for this library. To get the list of license files for a given build rule and all of its dependencies, you can use
buck query
.labels
(defaults to[]
) #Set of arbitrary strings which allow you to annotate a build rule with tags that can be searched for over an entire dependency tree using
buck query attrfilter()
.
Examples
# A rule that includes a single .py file. lua_library( name = 'fileutil', srcs = ['fileutil.lua'], ) # A rule that uses glob() to include all sources in the directory which the # rule is defined. It also lists a resource file that gets packaged with # the sources in this rule. lua_library( name = 'testutil', srcs = glob(['testutil/**/*.lua'], )