Skip to content

Commit 802cab2

Browse files
authored
Cleanup WORKSPACE. (#61)
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
1 parent 42572fb commit 802cab2

File tree

5 files changed

+48
-18
lines changed

5 files changed

+48
-18
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
~/.cargo/.crates2.json
5858
~/.cargo/bin
5959
~/.cargo/registry
60-
key: ${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.lock') }}
60+
key: ${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.lock', 'bazel/dependencies.bzl', 'bazel/repositories.bzl') }}
6161

6262
- name: Build (wasm32-unknown-unknown)
6363
run: bazelisk --bazelrc=/dev/null build --platforms=@io_bazel_rules_rust//rust/platform:wasm //...

WORKSPACE

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

3-
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
3+
load("@proxy_wasm_rust_sdk//bazel:repositories.bzl", "proxy_wasm_rust_sdk_repositories")
44

5-
http_archive(
6-
name = "io_bazel_rules_rust",
7-
sha256 = "17dbf791f4dab0fd4496ce5345af35e9ce2f6d011c1c8423436da517d019a3ea",
8-
strip_prefix = "rules_rust-2f97db595b05b1ee8cc44bde5bdf03c00bd169fb",
9-
url = "https://github.com/bazelbuild/rules_rust/archive/2f97db595b05b1ee8cc44bde5bdf03c00bd169fb.tar.gz",
10-
)
5+
proxy_wasm_rust_sdk_repositories()
116

12-
load("@io_bazel_rules_rust//rust:repositories.bzl", "rust_repositories")
7+
load("@proxy_wasm_rust_sdk//bazel:dependencies.bzl", "proxy_wasm_rust_sdk_dependencies")
138

14-
rust_repositories()
15-
16-
load("@io_bazel_rules_rust//:workspace.bzl", "rust_workspace")
17-
18-
rust_workspace()
19-
20-
load("//bazel/cargo:crates.bzl", "raze_fetch_remote_crates")
21-
22-
raze_fetch_remote_crates()
9+
proxy_wasm_rust_sdk_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_rust_sdk//bazel/cargo:crates.bzl", "raze_fetch_remote_crates")
17+
18+
def proxy_wasm_rust_sdk_dependencies():
19+
rust_repositories()
20+
raze_fetch_remote_crates()

bazel/repositories.bzl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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_rust_sdk_repositories():
18+
http_archive(
19+
name = "io_bazel_rules_rust",
20+
sha256 = "5cb2fbcc3debebc7b68f5f66c1b7ef741bdcca87c70594de688d4518538c36c8",
21+
strip_prefix = "rules_rust-aa7c6938cf1cc2973bc065c7532f89874bf09818",
22+
url = "https://github.com/bazelbuild/rules_rust/archive/aa7c6938cf1cc2973bc065c7532f89874bf09818.tar.gz",
23+
)

0 commit comments

Comments
 (0)