Skip to content

Latest commit

 

History

History
166 lines (105 loc) · 9.48 KB

File metadata and controls

166 lines (105 loc) · 9.48 KB

Public API re-exports

lua_binary

lua_binary(name, deps, data, tool)

Lua binary target. Will run the given tool with the registered lua toolchain.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
deps Runtime lua dependencies of target List of labels optional []
data extra files to be available at runtime List of labels optional []
tool lua file to run Label required

lua_library

lua_library(name, deps, srcs, strip_prefix)

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
deps runtime lua deps for this library List of labels optional []
srcs lua files List of labels required
strip_prefix prefix to strip off the sources (for example if the source is in a subfolder) String optional ""

luarocks_library

luarocks_library(name, deps, data, extra_cflags, out_binaries, srcrock)

install a luarocks dependency from a rockspec or .src.rock file

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
deps Runtime lua dependencies List of labels optional []
data extra files required to build the luarocks library List of labels optional []
extra_cflags extra CFLAGS to pass to compilation List of strings optional []
out_binaries List of binaries which should be produced. These can be accessed in the same was as out_binaries in rules_foreign_cc. List of strings optional []
srcrock path to srcrock to install Label required

github_dependency

github_dependency(dependency, tag, name, kwargs)

PARAMETERS

Name Description Default Value
dependency

-

none
tag

-

none
name

-

None
kwargs

-

none

luarocks_dependency

luarocks_dependency(dependency, name, kwargs)

PARAMETERS

Name Description Default Value
dependency

-

none
name

-

None
kwargs

-

none

lua_dependency

lua_dependency = use_extension("@rules_lua//lua:defs.bzl", "lua_dependency")
lua_dependency.luarocks(name, deps, dependency, extra_cflags, out_binaries, sha256, user, version)
lua_dependency.github(name, deps, dependency, extra_cflags, extra_fmt_vars, out_binaries,
                      rockspec_path, sha256, tag, user, version)

TAG CLASSES

luarocks

Fetch a dependency from luarocks

Attributes

Name Description Type Mandatory Default
name name to use, if not lua_ Name optional ""
deps lua deps List of labels optional []
dependency name of dependency on luarocks String required
extra_cflags extra CFLAGS to pass to compilation List of strings optional []
out_binaries List of binaries which should be produced List of strings optional []
sha256 sha256 of dependency String optional ""
user user on luarocks that uploaded the dependency String required
version version of dependency String required

github

Fetch a dependency from a url. Expects there to be a .rockspec file in the top level, or in the path specified by rockspec_path

Attributes

Name Description Type Mandatory Default
name name to use, if not lua_ Name optional ""
deps lua deps List of labels optional []
dependency name of dependency String required
extra_cflags extra CFLAGS to pass to compilation List of strings optional []
extra_fmt_vars any extra things to pass to format external_dependency_template. Dictionary: String -> String optional {}
out_binaries binaries to produce List of strings optional []
rockspec_path Possible sub-path to rockspec path in the downloaded content. Defaults to the top level String optional ""
sha256 expected hash String optional ""
tag tag on github String required
user username on github that uploaded the dependency String required
version version of actual underlying lua dependency String optional ""