-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWORKSPACE.bazel
68 lines (48 loc) · 2.06 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
64
65
66
67
68
workspace(name = "examples")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
maybe(
http_archive,
name = "rules_rust",
sha256 = "950a3ad4166ae60c8ccd628d1a8e64396106e7f98361ebe91b0bcfe60d8e4b60",
urls = [
"https://github.com/bazelbuild/rules_rust/releases/download/0.20.0/rules_rust-v0.20.0.tar.gz",
],
)
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
rules_rust_dependencies()
rust_register_toolchains(
edition = "2018",
)
load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
crate_universe_dependencies(bootstrap = True)
load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository", "splicing_config")
###############################################################################
# C A R G O R E M O T E
###############################################################################
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "names",
build_file = "//cargo_remote:BUILD.names.bazel",
sha256 = "eab40caca5805624ba31d028913931c3d054b22daafff6f43e3435cfa9fb761e",
strip_prefix = "names-0.13.0",
urls = ["https://github.com/fnichol/names/archive/refs/tags/v0.13.0.zip"],
)
crates_repository(
name = "crate_index_cargo_remote",
cargo_lockfile = "@names//:Cargo.lock",
# `generator` is not necessary in official releases.
# See load satement for `cargo_bazel_bootstrap`.
# generator = "@cargo_bazel_bootstrap//:cargo-bazel",
manifests = ["@names//:Cargo.toml"],
)
load(
"@crate_index_cargo_remote//:defs.bzl",
cargo_remote_crate_repositories = "crate_repositories",
)
cargo_remote_crate_repositories()
# ############# MDBOOK ###############
load("//cargo_mdbook:BUILD.bzl", "com_github_mdbook_fetch_archive")
com_github_mdbook_fetch_archive()
load("@crate_index_cargo_mdbook//:defs.bzl", cargo_mdbook_crate_repositories = "crate_repositories")
cargo_mdbook_crate_repositories()