Updated default Rust version to 1.49.0 to fix `bazel sync` (#544)

Having the `aarch64-apple-darwin` target in the list of default toolchains breaks `bazel sync` with the following error:
```output
INFO: Repository rust_darwin_aarch64 instantiated at:
  /Users/user/Code/cargo-raze/WORKSPACE.bazel:19:18: in <toplevel>
  /private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/io_bazel_rules_rust/rust/repositories.bzl:110:24: in rust_repositories
  /private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/io_bazel_rules_rust/rust/repositories.bzl:714:30: in rust_repository_set
Repository rule rust_toolchain_repository defined at:
  /private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/io_bazel_rules_rust/rust/repositories.bzl:613:44: in <toplevel>
WARNING: Download from https://static.rust-lang.org/dist/rust-1.48.0-aarch64-apple-darwin.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
ERROR: An error occurred during the fetch of repository 'rust_darwin_aarch64':
   Traceback (most recent call last):
	File "/private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/io_bazel_rules_rust/rust/repositories.bzl", line 578, column 44, in _rust_toolchain_repository_impl
		build_components = [_load_rust_compiler(ctx)]
	File "/private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/io_bazel_rules_rust/rust/repositories.bzl", line 483, column 24, in _load_rust_compiler
		load_arbitrary_tool(
	File "/private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/io_bazel_rules_rust/rust/repositories.bzl", line 442, column 17, in load_arbitrary_tool
		ctx.download(
Error in download: java.io.IOException: Error downloading [https://static.rust-lang.org/dist/rust-1.48.0-aarch64-apple-darwin.tar.gz] to /private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/rust_darwin_aarch64/rust-1.48.0-aarch64-apple-darwin.tar.gz: GET returned 404 Not Found
```

With the release of Rust version `1.49.0` (and the tooling for `aarch64-apple-darwin`), `bazel sync` once again succeeds.
Closes https://github.com/bazelbuild/rules_rust/issues/506

Additionally, a Bazel target has been created for `//util:fetch_shas.sh` (`//util:fetch_shas`) and made compatible with MacOS which was used to update the sha256 map.

Users on MacOS will need to install [GNU parallel](https://www.gnu.org/software/parallel/) which can be done via
```bash
brew install parallel
```
13 files changed
tree: 1838de04d492dcf9616e9beab8326fc4d3736982
  1. .bazelci/
  2. bindgen/
  3. cargo/
  4. docs/
  5. examples/
  6. proto/
  7. rust/
  8. test/
  9. tools/
  10. util/
  11. wasm_bindgen/
  12. .bazelignore
  13. .gitignore
  14. AUTHORS
  15. BUILD
  16. CODEOWNERS
  17. CONTRIBUTING.md
  18. CONTRIBUTORS
  19. LICENSE.txt
  20. README.md
  21. WORKSPACE
  22. workspace.bzl
README.md

Rust Rules

  • Postsubmit Build status
  • Postsubmit + Current Bazel Incompatible Flags Build status

Overview

This repository provides rules for building Rust projects with Bazel.

Please refer to the full documentation.