Skip to content

Commit bf2cfca

Browse files
authored
Clean up WORKSPACE. (#105)
Signed-off-by: mathetake <takeshi@tetrate.io>
1 parent 1e4bda0 commit bf2cfca

File tree

9 files changed

+104
-88
lines changed

9 files changed

+104
-88
lines changed

BUILD

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
load("//:bazel/variables.bzl", "COPTS", "LINKOPTS")
1+
load("@rules_cc//cc:defs.bzl", "cc_library")
2+
load("@proxy_wasm_cpp_host//bazel:variables.bzl", "COPTS")
23

34
licenses(["notice"]) # Apache 2
45

WORKSPACE

Lines changed: 4 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,9 @@
11
workspace(name = "proxy_wasm_cpp_host")
22

3-
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4-
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
3+
load("@proxy_wasm_cpp_host//bazel:repositories.bzl", "proxy_wasm_cpp_host_repositories")
54

6-
git_repository(
7-
name = "proxy_wasm_cpp_sdk",
8-
commit = "1b5f69ce1535b0c21f88c4af4ebf0ec51d255abe",
9-
remote = "https://github.com/proxy-wasm/proxy-wasm-cpp-sdk",
10-
)
5+
proxy_wasm_cpp_host_repositories()
116

12-
http_archive(
13-
name = "com_google_absl",
14-
sha256 = "19391fb4882601a65cb648d638c11aa301ce5f525ef02da1a9eafd22f72d7c59",
15-
strip_prefix = "abseil-cpp-37dd2562ec830d547a1524bb306be313ac3f2556",
16-
# 2020-01-29
17-
urls = ["https://github.com/abseil/abseil-cpp/archive/37dd2562ec830d547a1524bb306be313ac3f2556.tar.gz"],
18-
)
7+
load("@proxy_wasm_cpp_host//bazel:dependencies.bzl", "proxy_wasm_cpp_host_dependencies")
198

20-
# required by com_google_protobuf
21-
http_archive(
22-
name = "bazel_skylib",
23-
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
24-
urls = [
25-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
26-
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
27-
],
28-
)
29-
30-
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
31-
32-
bazel_skylib_workspace()
33-
34-
# rust rules
35-
http_archive(
36-
name = "io_bazel_rules_rust",
37-
sha256 = "7401878bf966325bbec5224eeb4ff7e8762681070b401acaa168da68d383563a",
38-
strip_prefix = "rules_rust-9741a32e50a8c50c504c0931111bb6048d6d6888",
39-
url = "https://github.com/bazelbuild/rules_rust/archive/9741a32e50a8c50c504c0931111bb6048d6d6888.tar.gz",
40-
)
41-
42-
load("@io_bazel_rules_rust//rust:repositories.bzl", "rust_repositories")
43-
44-
rust_repositories()
45-
46-
load("@io_bazel_rules_rust//:workspace.bzl", "rust_workspace")
47-
48-
rust_workspace()
49-
50-
load("//bazel/cargo:crates.bzl", "proxy_wasm_cpp_host_raze__fetch_remote_crates")
51-
52-
proxy_wasm_cpp_host_raze__fetch_remote_crates()
53-
54-
git_repository(
55-
name = "com_google_protobuf",
56-
commit = "655310ca192a6e3a050e0ca0b7084a2968072260",
57-
remote = "https://github.com/protocolbuffers/protobuf",
58-
shallow_since = "1565024848 -0700",
59-
)
60-
61-
http_archive(
62-
name = "boringssl",
63-
sha256 = "bb55b0ed2f0cb548b5dce6a6b8307ce37f7f748eb9f1be6bfe2d266ff2b4d52b",
64-
strip_prefix = "boringssl-2192bbc878822cf6ab5977d4257a1339453d9d39",
65-
urls = ["https://github.com/google/boringssl/archive/2192bbc878822cf6ab5977d4257a1339453d9d39.tar.gz"],
66-
)
67-
68-
http_archive(
69-
name = "com_google_googletest",
70-
sha256 = "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb",
71-
strip_prefix = "googletest-release-1.10.0",
72-
urls = ["https://github.com/google/googletest/archive/release-1.10.0.tar.gz"],
73-
)
74-
75-
http_archive(
76-
name = "wasmtime",
77-
build_file = "@proxy_wasm_cpp_host//bazel/external:wasmtime.BUILD",
78-
sha256 = "7874feb1026bbef06796bd5ab80e73f15b8e83752bde8dc93994f5bc039a4952",
79-
strip_prefix = "wasmtime-0.21.0",
80-
url = "https://github.com/bytecodealliance/wasmtime/archive/v0.21.0.tar.gz",
81-
)
82-
83-
http_archive(
84-
name = "wasm_c_api",
85-
build_file = "@proxy_wasm_cpp_host//bazel/external:wasm-c-api.BUILD",
86-
sha256 = "aea8cd095e9937f1e14f2c93e026317b197eb2345e7a817fe3932062eb7b792c",
87-
strip_prefix = "wasm-c-api-d9a80099d496b5cdba6f3fe8fc77586e0e505ddc",
88-
url = "https://github.com/WebAssembly/wasm-c-api/archive/d9a80099d496b5cdba6f3fe8fc77586e0e505ddc.tar.gz",
89-
)
9+
proxy_wasm_cpp_host_dependencies()

bazel/BUILD

Whitespace-only changes.

bazel/dependencies.bzl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright 2020 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
load("@io_bazel_rules_rust//rust:repositories.bzl", "rust_repositories")
16+
load("@proxy_wasm_cpp_host//bazel/cargo:crates.bzl", "proxy_wasm_cpp_host_raze__fetch_remote_crates")
17+
18+
def proxy_wasm_cpp_host_dependencies():
19+
rust_repositories()
20+
proxy_wasm_cpp_host_raze__fetch_remote_crates()

bazel/repositories.bzl

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Copyright 2020 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
16+
17+
def proxy_wasm_cpp_host_repositories():
18+
http_archive(
19+
name = "proxy_wasm_cpp_sdk",
20+
sha256 = "b97e3e716b1f38dc601487aa0bde72490bbc82b8f3ad73f1f3e69733984955df",
21+
strip_prefix = "proxy-wasm-cpp-sdk-956f0d500c380cc1656a2d861b7ee12c2515a664",
22+
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/956f0d500c380cc1656a2d861b7ee12c2515a664.tar.gz"],
23+
)
24+
25+
http_archive(
26+
name = "boringssl",
27+
sha256 = "bb55b0ed2f0cb548b5dce6a6b8307ce37f7f748eb9f1be6bfe2d266ff2b4d52b",
28+
strip_prefix = "boringssl-2192bbc878822cf6ab5977d4257a1339453d9d39",
29+
urls = ["https://github.com/google/boringssl/archive/2192bbc878822cf6ab5977d4257a1339453d9d39.tar.gz"],
30+
)
31+
32+
http_archive(
33+
name = "com_google_googletest",
34+
sha256 = "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb",
35+
strip_prefix = "googletest-release-1.10.0",
36+
urls = ["https://github.com/google/googletest/archive/release-1.10.0.tar.gz"],
37+
)
38+
39+
http_archive(
40+
name = "wasmtime",
41+
build_file = "@proxy_wasm_cpp_host//bazel/external:wasmtime.BUILD",
42+
sha256 = "7874feb1026bbef06796bd5ab80e73f15b8e83752bde8dc93994f5bc039a4952",
43+
strip_prefix = "wasmtime-0.21.0",
44+
url = "https://github.com/bytecodealliance/wasmtime/archive/v0.21.0.tar.gz",
45+
)
46+
47+
http_archive(
48+
name = "wasm_c_api",
49+
build_file = "@proxy_wasm_cpp_host//bazel/external:wasm-c-api.BUILD",
50+
sha256 = "aea8cd095e9937f1e14f2c93e026317b197eb2345e7a817fe3932062eb7b792c",
51+
strip_prefix = "wasm-c-api-d9a80099d496b5cdba6f3fe8fc77586e0e505ddc",
52+
url = "https://github.com/WebAssembly/wasm-c-api/archive/d9a80099d496b5cdba6f3fe8fc77586e0e505ddc.tar.gz",
53+
)
54+
55+
http_archive(
56+
name = "com_google_absl",
57+
sha256 = "19391fb4882601a65cb648d638c11aa301ce5f525ef02da1a9eafd22f72d7c59",
58+
strip_prefix = "abseil-cpp-37dd2562ec830d547a1524bb306be313ac3f2556",
59+
# 2020-01-29
60+
urls = ["https://github.com/abseil/abseil-cpp/archive/37dd2562ec830d547a1524bb306be313ac3f2556.tar.gz"],
61+
)
62+
63+
http_archive(
64+
name = "io_bazel_rules_rust",
65+
sha256 = "442a102e2a6f6c75e10d43f21c0c30218947a3e827d91529ced7380c5fec05f0",
66+
strip_prefix = "rules_rust-39523e32ac0bd64f5d60154114a42e61e58ffd17",
67+
url = "https://github.com/bazelbuild/rules_rust/archive/39523e32ac0bd64f5d60154114a42e61e58ffd17.tar.gz",
68+
)
69+
70+
http_archive(
71+
name = "com_google_protobuf",
72+
sha256 = "59621f4011a95df270748dcc0ec1cc51946473f0e140d4848a2f20c8719e43aa",
73+
strip_prefix = "protobuf-655310ca192a6e3a050e0ca0b7084a2968072260",
74+
url = "https://github.com/protocolbuffers/protobuf/archive/655310ca192a6e3a050e0ca0b7084a2968072260.tar.gz",
75+
)
File renamed without changes.

test/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
load("@rules_cc//cc:defs.bzl", "cc_test")
2-
load("//:bazel/variables.bzl", "COPTS", "LINKOPTS")
2+
load("@proxy_wasm_cpp_host//bazel:variables.bzl", "COPTS", "LINKOPTS")
33

44
cc_test(
55
name = "null_vm_test",

test/test_data/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//test/test_data:wasm.bzl", "wasm_rust_binary")
1+
load("@proxy_wasm_cpp_host//bazel:wasm.bzl", "wasm_rust_binary")
22

33
package(default_visibility = ["//visibility:public"])
44

test/test_data/trap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub extern "C" fn trigger() {
1717
one();
1818
}
1919
#[no_mangle]
20-
pub extern "C" fn trigger2(val: i32) -> i32 {
20+
pub extern "C" fn trigger2(_val: i32) -> i32 {
2121
three();
2222
0
2323
}

0 commit comments

Comments
 (0)