14
14
15
15
load ("@bazel_tools//tools/build_defs/repo:git.bzl" , "git_repository" , "new_git_repository" )
16
16
load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
17
+ load ("@bazel_tools//tools/build_defs/repo:utils.bzl" , "maybe" )
17
18
18
19
def proxy_wasm_cpp_host_repositories ():
19
- http_archive (
20
- name = "proxy_wasm_cpp_sdk" ,
21
- sha256 = "c57de2425b5c61d7f630c5061e319b4557ae1f1c7526e5a51c33dc1299471b08" ,
22
- strip_prefix = "proxy-wasm-cpp-sdk-fd0be8405db25de0264bdb78fae3a82668c03782" ,
23
- urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/fd0be8405db25de0264bdb78fae3a82668c03782.tar.gz" ],
20
+ # Bazel extensions.
21
+
22
+ maybe (
23
+ http_archive ,
24
+ name = "bazel_skylib" ,
25
+ urls = [
26
+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz" ,
27
+ "https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz" ,
28
+ ],
29
+ sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d" ,
30
+ )
31
+
32
+ maybe (
33
+ http_archive ,
34
+ name = "rules_foreign_cc" ,
35
+ sha256 = "d54742ffbdc6924f222d2179f0e10e911c5c659c4ae74158e9fe827aad862ac6" ,
36
+ strip_prefix = "rules_foreign_cc-0.2.0" ,
37
+ url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.2.0.tar.gz" ,
38
+ )
39
+
40
+ maybe (
41
+ http_archive ,
42
+ name = "rules_python" ,
43
+ sha256 = "a30abdfc7126d497a7698c29c46ea9901c6392d6ed315171a6df5ce433aa4502" ,
44
+ strip_prefix = "rules_python-0.6.0" ,
45
+ url = "https://github.com/bazelbuild/rules_python/archive/0.6.0.tar.gz" ,
24
46
)
25
47
26
- http_archive (
48
+ maybe (
49
+ http_archive ,
50
+ name = "rules_rust" ,
51
+ sha256 = "8a2052e8ec707aa04a6b9e72bfc67fea44e915ecab1d2d0a4835ad51c2410c36" ,
52
+ strip_prefix = "rules_rust-b16c26ba5faf1c58ebe94582afd20567ce676e6d" ,
53
+ # NOTE: Update Rust version for Linux/s390x in bazel/dependencies.bzl.
54
+ url = "https://github.com/bazelbuild/rules_rust/archive/b16c26ba5faf1c58ebe94582afd20567ce676e6d.tar.gz" ,
55
+ )
56
+
57
+ # Core.
58
+
59
+ maybe (
60
+ http_archive ,
27
61
name = "boringssl" ,
28
62
# 2022-01-10 (master-with-bazel)
29
63
sha256 = "a530919e3141d00d593a0d74cd0f9f88707e35ec58bb62245968fec16cb9257f" ,
30
64
strip_prefix = "boringssl-9420fb54116466923afa1f34a23dd8a4a7ddb69d" ,
31
65
urls = ["https://github.com/google/boringssl/archive/9420fb54116466923afa1f34a23dd8a4a7ddb69d.tar.gz" ],
32
66
)
33
67
34
- http_archive (
68
+ maybe (
69
+ http_archive ,
35
70
name = "com_google_googletest" ,
36
71
sha256 = "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb" ,
37
72
strip_prefix = "googletest-release-1.10.0" ,
38
73
urls = ["https://github.com/google/googletest/archive/release-1.10.0.tar.gz" ],
39
74
)
40
75
41
- http_archive (
76
+ maybe (
77
+ http_archive ,
42
78
name = "com_google_protobuf" ,
43
79
sha256 = "77ad26d3f65222fd96ccc18b055632b0bfedf295cb748b712a98ba1ac0b704b2" ,
44
80
strip_prefix = "protobuf-3.17.3" ,
45
81
url = "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz" ,
46
82
)
47
83
48
- http_archive (
49
- name = "llvm13" ,
50
- build_file = "@proxy_wasm_cpp_host//bazel/external:llvm13.BUILD" ,
51
- sha256 = "408d11708643ea826f519ff79761fcdfc12d641a2510229eec459e72f8163020" ,
52
- strip_prefix = "llvm-13.0.0.src" ,
53
- url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/llvm-13.0.0.src.tar.xz" ,
84
+ maybe (
85
+ http_archive ,
86
+ name = "proxy_wasm_cpp_sdk" ,
87
+ sha256 = "c57de2425b5c61d7f630c5061e319b4557ae1f1c7526e5a51c33dc1299471b08" ,
88
+ strip_prefix = "proxy-wasm-cpp-sdk-fd0be8405db25de0264bdb78fae3a82668c03782" ,
89
+ urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/fd0be8405db25de0264bdb78fae3a82668c03782.tar.gz" ],
90
+ )
91
+
92
+ # V8 with dependencies.
93
+
94
+ maybe (
95
+ git_repository ,
96
+ name = "v8" ,
97
+ # 9.9.115.3
98
+ commit = "90f089d97b6e4146ad106eee1829d86ad6392027" ,
99
+ remote = "https://chromium.googlesource.com/v8/v8" ,
100
+ shallow_since = "1643043727 +0000" ,
101
+ )
102
+
103
+ native .bind (
104
+ name = "wee8" ,
105
+ actual = "@v8//:wee8" ,
106
+ )
107
+
108
+ maybe (
109
+ new_git_repository ,
110
+ name = "com_googlesource_chromium_base_trace_event_common" ,
111
+ build_file = "@v8//:bazel/BUILD.trace_event_common" ,
112
+ commit = "7f36dbc19d31e2aad895c60261ca8f726442bfbb" ,
113
+ remote = "https://chromium.googlesource.com/chromium/src/base/trace_event/common.git" ,
114
+ shallow_since = "1635355186 -0700" ,
115
+ )
116
+
117
+ native .bind (
118
+ name = "base_trace_event_common" ,
119
+ actual = "@com_googlesource_chromium_base_trace_event_common//:trace_event_common" ,
54
120
)
55
121
56
- http_archive (
122
+ maybe (
123
+ new_git_repository ,
124
+ name = "com_googlesource_chromium_zlib" ,
125
+ build_file = "@v8//:bazel/BUILD.zlib" ,
126
+ commit = "fc5cfd78a357d5bb7735a58f383634faaafe706a" ,
127
+ remote = "https://chromium.googlesource.com/chromium/src/third_party/zlib.git" ,
128
+ shallow_since = "1642005087 -0800" ,
129
+ )
130
+
131
+ native .bind (
132
+ name = "zlib" ,
133
+ actual = "@com_googlesource_chromium_zlib//:zlib" ,
134
+ )
135
+
136
+ native .bind (
137
+ name = "zlib_compression_utils" ,
138
+ actual = "@com_googlesource_chromium_zlib//:zlib_compression_utils" ,
139
+ )
140
+
141
+ # WAMR with dependencies.
142
+
143
+ maybe (
144
+ http_archive ,
57
145
name = "com_github_bytecodealliance_wasm_micro_runtime" ,
58
146
build_file = "@proxy_wasm_cpp_host//bazel/external:wamr.BUILD" ,
59
147
# WAMR-01-18-2022
@@ -67,15 +155,28 @@ def proxy_wasm_cpp_host_repositories():
67
155
actual = "@com_github_bytecodealliance_wasm_micro_runtime//:wamr_lib" ,
68
156
)
69
157
70
- http_archive (
158
+ maybe (
159
+ http_archive ,
160
+ name = "llvm13" ,
161
+ build_file = "@proxy_wasm_cpp_host//bazel/external:llvm13.BUILD" ,
162
+ sha256 = "408d11708643ea826f519ff79761fcdfc12d641a2510229eec459e72f8163020" ,
163
+ strip_prefix = "llvm-13.0.0.src" ,
164
+ url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/llvm-13.0.0.src.tar.xz" ,
165
+ )
166
+
167
+ # Wasmtime with dependencies.
168
+
169
+ maybe (
170
+ http_archive ,
71
171
name = "com_github_bytecodealliance_wasmtime" ,
72
172
build_file = "@proxy_wasm_cpp_host//bazel/external:wasmtime.BUILD" ,
73
173
sha256 = "c59a2aa110b25921d370944287cd97205c73cf3dc76776c5b3551135c1e42ddc" ,
74
174
strip_prefix = "wasmtime-0.33.0" ,
75
175
url = "https://github.com/bytecodealliance/wasmtime/archive/v0.33.0.tar.gz" ,
76
176
)
77
177
78
- http_archive (
178
+ maybe (
179
+ http_archive ,
79
180
name = "com_github_webassembly_wasm_c_api" ,
80
181
build_file = "@proxy_wasm_cpp_host//bazel/external:wasm-c-api.BUILD" ,
81
182
sha256 = "c774044f51431429e878bd1b9e2a4e38932f861f9211df72f75e9427eb6b8d32" ,
@@ -88,30 +189,10 @@ def proxy_wasm_cpp_host_repositories():
88
189
actual = "@com_github_webassembly_wasm_c_api//:wasmtime_lib" ,
89
190
)
90
191
91
- http_archive (
92
- name = "rules_rust" ,
93
- sha256 = "8a2052e8ec707aa04a6b9e72bfc67fea44e915ecab1d2d0a4835ad51c2410c36" ,
94
- strip_prefix = "rules_rust-b16c26ba5faf1c58ebe94582afd20567ce676e6d" ,
95
- # NOTE: Update Rust version for Linux/s390x in bazel/dependencies.bzl.
96
- url = "https://github.com/bazelbuild/rules_rust/archive/b16c26ba5faf1c58ebe94582afd20567ce676e6d.tar.gz" ,
97
- )
98
-
99
- http_archive (
100
- name = "rules_foreign_cc" ,
101
- sha256 = "d54742ffbdc6924f222d2179f0e10e911c5c659c4ae74158e9fe827aad862ac6" ,
102
- strip_prefix = "rules_foreign_cc-0.2.0" ,
103
- url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.2.0.tar.gz" ,
104
- )
105
-
106
- http_archive (
107
- name = "llvm" ,
108
- build_file = "@proxy_wasm_cpp_host//bazel/external:llvm.BUILD" ,
109
- sha256 = "7d9a8405f557cefc5a21bf5672af73903b64749d9bc3a50322239f56f34ffddf" ,
110
- strip_prefix = "llvm-12.0.1.src" ,
111
- url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/llvm-12.0.1.src.tar.xz" ,
112
- )
192
+ # WAVM with dependencies.
113
193
114
- http_archive (
194
+ maybe (
195
+ http_archive ,
115
196
name = "com_github_wavm_wavm" ,
116
197
build_file = "@proxy_wasm_cpp_host//bazel/external:wavm.BUILD" ,
117
198
sha256 = "bf2b2aec8a4c6a5413081c0527cb40dd16cb67e9c74a91f8a82fe1cf27a3c5d5" ,
@@ -126,62 +207,11 @@ def proxy_wasm_cpp_host_repositories():
126
207
actual = "@com_github_wavm_wavm//:wavm_lib" ,
127
208
)
128
209
129
- git_repository (
130
- name = "v8" ,
131
- # 9.9.115.3
132
- commit = "90f089d97b6e4146ad106eee1829d86ad6392027" ,
133
- remote = "https://chromium.googlesource.com/v8/v8" ,
134
- shallow_since = "1643043727 +0000" ,
135
- )
136
-
137
- native .bind (
138
- name = "wee8" ,
139
- actual = "@v8//:wee8" ,
140
- )
141
-
142
- new_git_repository (
143
- name = "com_googlesource_chromium_base_trace_event_common" ,
144
- build_file = "@v8//:bazel/BUILD.trace_event_common" ,
145
- commit = "7f36dbc19d31e2aad895c60261ca8f726442bfbb" ,
146
- remote = "https://chromium.googlesource.com/chromium/src/base/trace_event/common.git" ,
147
- shallow_since = "1635355186 -0700" ,
148
- )
149
-
150
- native .bind (
151
- name = "base_trace_event_common" ,
152
- actual = "@com_googlesource_chromium_base_trace_event_common//:trace_event_common" ,
153
- )
154
-
155
- new_git_repository (
156
- name = "com_googlesource_chromium_zlib" ,
157
- build_file = "@v8//:bazel/BUILD.zlib" ,
158
- commit = "fc5cfd78a357d5bb7735a58f383634faaafe706a" ,
159
- remote = "https://chromium.googlesource.com/chromium/src/third_party/zlib.git" ,
160
- shallow_since = "1642005087 -0800" ,
161
- )
162
-
163
- native .bind (
164
- name = "zlib" ,
165
- actual = "@com_googlesource_chromium_zlib//:zlib" ,
166
- )
167
-
168
- native .bind (
169
- name = "zlib_compression_utils" ,
170
- actual = "@com_googlesource_chromium_zlib//:zlib_compression_utils" ,
171
- )
172
-
173
- http_archive (
174
- name = "rules_python" ,
175
- sha256 = "a30abdfc7126d497a7698c29c46ea9901c6392d6ed315171a6df5ce433aa4502" ,
176
- strip_prefix = "rules_python-0.6.0" ,
177
- url = "https://github.com/bazelbuild/rules_python/archive/0.6.0.tar.gz" ,
178
- )
179
-
180
- http_archive (
181
- name = "bazel_skylib" ,
182
- urls = [
183
- "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz" ,
184
- "https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz" ,
185
- ],
186
- sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d" ,
210
+ maybe (
211
+ http_archive ,
212
+ name = "llvm" ,
213
+ build_file = "@proxy_wasm_cpp_host//bazel/external:llvm.BUILD" ,
214
+ sha256 = "7d9a8405f557cefc5a21bf5672af73903b64749d9bc3a50322239f56f34ffddf" ,
215
+ strip_prefix = "llvm-12.0.1.src" ,
216
+ url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/llvm-12.0.1.src.tar.xz" ,
187
217
)
0 commit comments