tree: 12feac09827304c8cdf62d92659cb0a413758829 [path history] [tgz]
  1. private/
  2. src/
  3. tests/
  4. bootstrap.bzl
  5. BUILD.bazel
  6. Cargo.lock
  7. Cargo.toml
  8. CONTRIBUTING.md
  9. Cross.toml
  10. defs.bzl
  11. README.md
crate_universe/README.md

Crate Universe

How to use

Note: crate_universe is experimental, and may have breaking API changes at any time. These instructions may also change without notice.

Find the most up-to-date crate_universe release at https://github.com/bazelbuild/rules_rust/releases and add the crate_universe_defaults.bzl file to your workspace (eg `./3rdparty/rules_rust/crate_universe_defaults.bzl).

With this in place, the following can be added to your WORKSPACE.bazel file.

load("//3rdparty/rules_rust:crate_universe_defaults.bzl", "DEFAULT_URL_TEMPLATE", "DEFAULT_SHA256_CHECKSUMS")

load("@rules_rust//crate_universe:deps.bzl", "crate_universe_deps")

crate_universe_deps(url_template = DEFAULT_URL_TEMPLATE, sha256s = DEFAULT_SHA256_CHECKSUMS)

The crate_universe macro can now be used within your workspace. See the examples for more context.