@@ -18,13 +18,14 @@ To use the Rust rules, add the following to your `WORKSPACE` file to add the ext
18
18
``` python
19
19
load(" @bazel_tools//tools/build_defs/repo:http.bzl" , " http_archive" )
20
20
21
+ # To find additional information on this release or newer ones visit:
22
+ # https://github.com/bazelbuild/rules_rust/releases
21
23
http_archive(
22
24
name = " rules_rust" ,
23
- sha256 = " 531bdd470728b61ce41cf7604dc4f9a115983e455d46ac1d0c1632f613ab9fc3" ,
24
- strip_prefix = " rules_rust-d8238877c0e552639d3e057aadd6bfcf37592408" ,
25
+ sha256 = " 7453856d239a004c9e29cde2e45903a068446e4a69501ee7393faf08e1a30403" ,
25
26
urls = [
26
- # `main` branch as of 2021-08-23
27
- " https://github.com/bazelbuild/rules_rust/archive/d8238877c0e552639d3e057aadd6bfcf37592408 .tar.gz" ,
27
+ " https://mirror.bazel.build/github.com/bazelbuild/rules_rust/releases/download/0.1.0/rules_rust-v0.1.0.tar.gz " ,
28
+ " https://github.com/bazelbuild/rules_rust/releases/download/0.1.0/rules_rust-v0.1.0 .tar.gz" ,
28
29
],
29
30
)
30
31
@@ -64,22 +65,22 @@ You can also browse the [full API in one page](flatten.md).
64
65
To build with a particular version of the Rust compiler, pass that version to [ ` rust_repositories ` ] ( flatten.md#rust_repositories ) :
65
66
66
67
``` python
67
- rust_repositories(version = " 1.53 .0" , edition = " 2018" )
68
+ rust_repositories(version = " 1.59 .0" , edition = " 2018" )
68
69
```
69
70
70
71
As well as an exact version, ` version ` can be set to ` "nightly" ` or ` "beta" ` . If set to these values, ` iso_date ` must also be set:
71
72
72
73
``` python
73
- rust_repositories(version = " nightly" , iso_date = " 2021-06-16 " , edition = " 2018" )
74
+ rust_repositories(version = " nightly" , iso_date = " 2022-02-23 " , edition = " 2018" )
74
75
```
75
76
76
77
Similarly, ` rustfmt_version ` may also be configured:
77
78
78
79
``` python
79
- rust_repositories(rustfmt_version = " 1.53 .0" )
80
+ rust_repositories(rustfmt_version = " 1.59 .0" )
80
81
```
81
82
82
83
## External Dependencies
83
84
84
- If [ crate_universe] crate_universe.md) does not suit your needs, another common approach to managing external dependencies is using
85
+ If [ crate_universe] ( crate_universe.md ) does not suit your needs, another common approach to managing external dependencies is using
85
86
[ cargo-raze] ( https://github.com/google/cargo-raze ) to generate ` BUILD ` files for Cargo crates.
0 commit comments