-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE.bazel
96 lines (67 loc) · 2.96 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
workspace(name = "iot_service_repo")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_rust",
integrity = "sha256-F8U7+AC5MvMtPKGdLLnorVM84cDXKfDRgwd7/dq3rUY=",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.46.0/rules_rust-v0.46.0.tar.gz"],
)
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
rules_rust_dependencies()
rust_register_toolchains(
edition = "2021",
versions = ["1.78.0"],
)
load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
crate_universe_dependencies()
load("@rules_rust//proto/protobuf:repositories.bzl", "rust_proto_protobuf_dependencies", "rust_proto_protobuf_register_toolchains")
rust_proto_protobuf_dependencies()
rust_proto_protobuf_register_toolchains()
load("@rules_rust//proto/protobuf:transitive_repositories.bzl", "rust_proto_protobuf_transitive_repositories")
rust_proto_protobuf_transitive_repositories()
load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository")
load("@rules_rust//proto/prost:repositories.bzl", "rust_prost_dependencies")
rust_prost_dependencies()
load("@rules_rust//proto/prost:transitive_repositories.bzl", "rust_prost_transitive_repositories")
rust_prost_transitive_repositories()
crates_repository(
name = "crate_index",
cargo_config = "//iot-service-rs:.cargo/config.toml",
cargo_lockfile = "//iot-service-rs:Cargo.lock",
lockfile = "//iot-service-rs:cargo-bazel-lock.json",
manifests = [
"//iot-service-rs:Cargo.toml",
"//iot-service-rs:backend/Cargo.toml",
"//iot-service-rs:frontend/Cargo.toml",
"//iot-service-rs:model/Cargo.toml",
],
annotations = {
"protoc-gen-prost": [crate.annotation(
gen_binaries = ["protoc-gen-prost"],
patch_args = [
"-p1",
],
)],
"protoc-gen-tonic": [crate.annotation(
gen_binaries = ["protoc-gen-tonic"],
)],
},
packages = {
"prost": crate.spec( version = "0.12.0"),
"prost-build": crate.spec( version = "0.12.0"),
"prost-types": crate.spec( version = "0.12.0"),
"protoc-gen-prost": crate.spec( version = "0.3.1"),
"protoc-gen-tonic": crate.spec( version = "0.4.0"),
"tonic": crate.spec( version = "0.10.0"),
},
rust_version = "1.78.0",
)
# register_toolchains("//toolchains:prost_toolchain")
# ---
# register_toolchains("//toolchains:prost_toolchain")
# load("@rules_rust//proto/protobuf:repositories.bzl", "rust_proto_protobuf_dependencies", "rust_proto_protobuf_register_toolchains")
# rust_proto_protobuf_dependencies()
# rust_proto_protobuf_register_toolchains()
# load("@rules_rust//proto/protobuf:transitive_repositories.bzl", "rust_proto_protobuf_transitive_repositories")
# rust_proto_protobuf_transitive_repositories()
load("@crate_index//:defs.bzl", "crate_repositories")
crate_repositories()