fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
535af8b5
patching
1"""A module is used to assist in bootstrapping cargo-bazel""" 2 3load ( "//cargo:defs.bzl" , "cargo_bootstrap_repository" ) 4load ( "//crate_universe/private:srcs.bzl" , "CARGO_BAZEL_SRCS" ) 5 6# buildifier: disable=bzl-visibility 7load ( "//rust/private:common.bzl" , "rust_common" ) 8 9def cargo_bazel_bootstrap ( name = "cargo_bazel_bootstrap" , rust_version = rust_common . default_version , ** kwargs ): 10"""An optional repository which bootstraps `cargo-bazel` for use with `crates_repository` 11 12Args: 13name (str, optional): The name of the `cargo_bootstrap_repository`. 14rust_version (str, optional): The rust version to use. Defaults to the default of `cargo_bootstrap_repository`. 15**kwargs: kwargs to pass through to cargo_bootstrap_repository. 16""" 17cargo_bootstrap_repository ( 18name = name , 19srcs = CARGO_BAZEL_SRCS , 20binary = "cargo-bazel" , 21cargo_lockfile = "@rules_rust//crate_universe:Cargo.lock" , 22cargo_toml = "@rules_rust//crate_universe:Cargo.toml" , 23version = rust_version , 24# The increased timeout helps avoid flakes in CI 25timeout = 900 , 26** kwargs 27)