-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE.bazel
63 lines (55 loc) · 2.13 KB
/
WORKSPACE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "bazel_skylib",
urls = [
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
],
sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
http_archive(
name = "rules_rust",
sha256 = "531bdd470728b61ce41cf7604dc4f9a115983e455d46ac1d0c1632f613ab9fc3",
strip_prefix = "rules_rust-d8238877c0e552639d3e057aadd6bfcf37592408",
urls = [
# `main` branch as of 2021-08-23
"https://github.com/bazelbuild/rules_rust/archive/d8238877c0e552639d3e057aadd6bfcf37592408.tar.gz",
],
)
load("//3rdparty/rules_rust:crate_universe_defaults.bzl", "DEFAULT_URL_TEMPLATE", "DEFAULT_SHA256_CHECKSUMS")
load("@rules_rust//crate_universe:defs.bzl", "crate_universe")
crate_universe(
name = "crates",
cargo_toml_files = [
"//hello-world:Cargo.toml",
"//utils:Cargo.toml",
],
resolver_download_url_template = DEFAULT_URL_TEMPLATE,
resolver_sha256s = DEFAULT_SHA256_CHECKSUMS,
# leave unset for default multi-platform support
supported_targets = [
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
],
# [package.metadata.raze.xxx] lines in Cargo.toml files are ignored;
# the overrides need to be declared in the repo rule instead.
# overrides = {
# "example-sys": crate.override(
# extra_build_script_env_vars = {"PATH": "/usr/bin"},
# ),
# },
# to use a lockfile, uncomment the following line,
# create an empty file in the location, and then build
# with REPIN=1 bazel build ...
#lockfile = "//:crate_universe.lock",
)
load("@rules_rust//rust:repositories.bzl", "rust_repositories")
RUST_VERSION = "1.57.0"
rust_repositories(
edition = "2021",
version = RUST_VERSION,
)
load("@crates//:defs.bzl", "pinned_rust_install")
pinned_rust_install()