Buck: prebuilt_rust_library()

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.14.0 of Rust.

Arguments

  • name (required) #

    The name of the rule.

  • 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 to rule 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.

  • visibility (defaults to []) #

    List of build target patterns that identify the build rules that can include this rule in its deps.

  • 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',
)