prebuilt_rust_library()
This is liable to change in the future.
A prebuilt_rust_library() specifies a pre-built Rust crate, and any dependencies it may have on other crates (typically also prebuilt).
Note: Buck is currently tested with (and therefore supports) version 1.32.0 of Rust.
Arguments
name
(required) #The short name for this build target.
rlib
(required) #Path to the precompiled Rust crate - typically of the form 'libfoo.rlib', or 'libfoo-abc123def456.rlib' if it has symbol versioning metadata.
crate
(defaults torule name
) #Set the generated crate name (for libraries) or executable name (for binaries), independent of the rule name. Defaults to the rule name.
deps
(defaults to[]
) #The set of dependencies of this rule. Currently, this supports rust_library and prebuilt_rust_library rules.
platform_deps
(defaults to[]
) #Platform specific dependencies. These should be specified as a list of pairs where the first element is an un-anchored regex (in java.util.regex.Pattern syntax) against which the platform name is matched, and the second element is a list of dependencies (same format as
deps
) that are exported if the platform matches the regex. Seedeps
for more information.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
prebuilt_rust_library( name = 'dailygreet', rlib = 'libdailygreet.rlib', deps = [ ':jinsy', ], ) prebuilt_rust_library( name = 'jinsy', rlib = 'libarbiter-6337e9cb899bd295.rlib', )