crates_repository API

aliases

aliases(normal, normal_dev, proc_macro, proc_macro_dev, build, build_proc_macro, package_name)

Produces a map of Crate alias names to their original label

If no dependency kinds are specified, normal and proc_macro are used by default. Setting any one flag will otherwise determine the contents of the returned dict.

PARAMETERS

NameDescriptionDefault Value
normalIf True, normal dependencies are included in the output list.False
normal_devIf True, normla dev dependencies will be included in the output list..False
proc_macroIf True, proc_macro dependencies are included in the output list.False
proc_macro_devIf True, dev proc_macro dependencies are included in the output list.False
buildIf True, build dependencies are included in the output list.False
build_proc_macroIf True, build proc_macro dependencies are included in the output list.False
package_nameThe package name of the set of dependencies to look up. Defaults to native.package_name() when unset.None

RETURNS

dict: The aliases of all associated packages

all_crate_deps

all_crate_deps(normal, normal_dev, proc_macro, proc_macro_dev, build, build_proc_macro,
               package_name)

Finds the fully qualified label of all requested direct crate dependencies for the package where this macro is called.

If no parameters are set, all normal dependencies are returned. Setting any one flag will otherwise impact the contents of the returned list.

PARAMETERS

NameDescriptionDefault Value
normalIf True, normal dependencies are included in the output list.False
normal_devIf True, normla dev dependencies will be included in the output list..False
proc_macroIf True, proc_macro dependencies are included in the output list.False
proc_macro_devIf True, dev proc_macro dependencies are included in the output list.False
buildIf True, build dependencies are included in the output list.False
build_proc_macroIf True, build proc_macro dependencies are included in the output list.False
package_nameThe package name of the set of dependencies to look up. Defaults to native.package_name() when unset.None

RETURNS

list: A list of labels to generated rust targets (str)

crate_deps

crate_deps(deps, package_name)

Finds the fully qualified label of the requested crates for the package where this macro is called.

PARAMETERS

NameDescriptionDefault Value
depsThe desired list of crate targets.none
package_nameThe package name of the set of dependencies to look up. Defaults to native.package_name().None

RETURNS

list: A list of labels to generated rust targets (str)

crate_repositories

crate_repositories()

A macro for defining repositories for all generated crates