-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
96 lines (77 loc) · 3.28 KB
/
WORKSPACE
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 = "rules_rust_repro",
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
# Protobuf rules
http_archive(
name = "rules_proto",
sha256 = "80d3a4ec17354cccc898bfe32118edd934f851b03029d63ef3fc7c8663a7415c",
strip_prefix = "rules_proto-5.3.0-21.5",
urls = [
"https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.5.tar.gz",
],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
# Rust rules
http_archive(
name = "rules_rust",
sha256 = "dd79bd4e2e2adabae738c5e93c36d351cf18071ff2acf6590190acf4138984f6",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.14.0/rules_rust-v0.14.0.tar.gz"],
)
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
rules_rust_dependencies()
rust_register_toolchains()
load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
crate_universe_dependencies()
load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository")
load("//:rust_annotations.bzl", "V8_ADDITIVE_BUILD_FILE_CONTENT")
crates_repository(
name = "crate_index",
annotations = {
"v8": [crate.annotation(
additive_build_file_content = V8_ADDITIVE_BUILD_FILE_CONTENT,
gen_build_script = False,
deps = [":librusty_v8"],
)],
"apollo-router": [crate.annotation(
build_script_data = [
"@com_google_protobuf//:protoc",
"@com_google_protobuf//:well_known_type_protos",
],
build_script_env = {
"PROTOC": "$(execpath @com_google_protobuf//:protoc)",
# Add protos from @com_google_protobuf//:well_known_type_protos
# I couldn't use the predefined variables since it expands to
# more than one file. There should be a better approach still.
# https://bazel.build/reference/be/make-variables#predefined_label_variables
"PROTOC_INCLUDE": "$${pwd}/external/com_github_protocolbuffers_protobuf/src",
},
)],
"opentelemetry-proto": [crate.annotation(
build_script_data = ["@com_google_protobuf//:protoc"],
build_script_env = {"PROTOC": "$(execpath @com_google_protobuf//:protoc)"},
)],
},
cargo_lockfile = "//:Cargo.lock",
lockfile = "//:cargo-bazel-lock.json",
manifests = [
"//:Cargo.toml",
"//:xtask/Cargo.toml",
],
)
load("@crate_index//:defs.bzl", "crate_repositories")
crate_repositories()
http_file(
name = "librusty_v8_release_x86_64-unknown-linux-gnu",
downloaded_file_path = "librusty_v8_release_x86_64-unknown-linux-gnu.a",
sha256 = "",
urls = ["https://github.com/denoland/rusty_v8/releases/download/v0.44.3/librusty_v8_release_x86_64-unknown-linux-gnu.a"],
)
http_file(
name = "librusty_v8_release_x86_64-apple-darwin",
downloaded_file_path = "librusty_v8_release_x86_64-apple-darwin.a",
sha256 = "7f4941adac98368ee2bc2a9e25c605e443049e6ae01fea872e87cccdb509f8eb",
urls = ["https://github.com/denoland/rusty_v8/releases/download/v0.44.3/librusty_v8_release_x86_64-apple-darwin.a"],
)