Skip to content

Commit 596ce4a

Browse files
committed
repo: Shift cargo-raze -> crate_universe
Signed-off-by: Ryan Northey <[email protected]>
1 parent 9be9637 commit 596ce4a

File tree

219 files changed

+14392
-9540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+14392
-9540
lines changed

Diff for: .bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.2.0
1+
6.5.0

Diff for: .github/workflows/format.yml

+6-10
Original file line numberDiff line numberDiff line change
@@ -78,29 +78,25 @@ jobs:
7878
- name: Format (buildifier)
7979
run: find . -name "WORKSPACE" -o -name "*BUILD*" -o -name "*.bzl" | xargs -n1 buildifier -mode=check
8080

81-
cargo_raze:
82-
name: check format with cargo-raze
81+
rules_rust:
82+
name: check format with rules_rust
8383

8484
runs-on: ubuntu-latest
8585

8686
steps:
8787
- uses: actions/checkout@v2
8888

89-
- name: Install dependencies
90-
run: cargo install cargo-raze --version 0.14.1
91-
9289
- name: Format (bazel query)
9390
run: |
9491
bazel query 'deps(//bazel/cargo/...)'
9592
9693
- name: Format (cargo raze)
9794
working-directory: bazel/cargo
9895
run: |
99-
cd wasmsign && cargo raze && cd ..
100-
cd wasmtime && cargo raze && cd ..
101-
# Ignore manual changes in "errno" and "rustix" crates until fixed in cargo-raze.
102-
# See: https://github.com/google/cargo-raze/issues/451
103-
git diff --exit-code -- ':!wasmtime/remote/BUILD.errno-0.*.bazel' ':!wasmtime/remote/BUILD.rustix-0.*.bazel'
96+
cargo generate-lockfile
97+
mv Cargo.lock bazel/cargo/Cargo.Bazel.lock
98+
bazel run //bazel/cargo:crates_vendor
99+
git diff --exit-code
104100
105101
clang_format:
106102
name: check format with clang-format

Diff for: bazel/cargo/wasmtime/BUILD.bazel

+26-61
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,31 @@
1-
"""
2-
@generated
3-
cargo-raze generated Bazel file.
1+
# Copyright 2022 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("@rules_rust//crate_universe:defs.bzl", "crates_vendor")
416

5-
DO NOT EDIT! Replaced on runs of cargo-raze
6-
"""
7-
8-
package(default_visibility = ["//visibility:public"])
9-
10-
licenses([
11-
"notice", # See individual crates for specific licenses
12-
])
13-
14-
# Aliased targets
15-
alias(
16-
name = "anyhow",
17-
actual = "@wasmtime__anyhow__1_0_71//:anyhow",
18-
tags = [
19-
"cargo-raze",
20-
"manual",
21-
],
22-
)
23-
24-
alias(
25-
name = "env_logger",
26-
actual = "@wasmtime__env_logger__0_10_0//:env_logger",
27-
tags = [
28-
"cargo-raze",
29-
"manual",
30-
],
31-
)
32-
33-
alias(
34-
name = "once_cell",
35-
actual = "@wasmtime__once_cell__1_17_2//:once_cell",
36-
tags = [
37-
"cargo-raze",
38-
"manual",
39-
],
40-
)
41-
42-
alias(
43-
name = "wasmtime",
44-
actual = "@wasmtime__wasmtime__9_0_3//:wasmtime",
45-
tags = [
46-
"cargo-raze",
47-
"manual",
48-
],
49-
)
50-
51-
alias(
52-
name = "wasmtime_c_api_macros",
53-
actual = "@wasmtime__wasmtime_c_api_macros__0_0_0//:wasmtime_c_api_macros",
54-
tags = [
55-
"cargo-raze",
56-
"manual",
57-
],
58-
)
59-
60-
# Export file for Stardoc support
6117
exports_files(
6218
[
63-
"crates.bzl",
19+
"Cargo.toml",
20+
"Cargo.Bazel.lock",
6421
],
65-
visibility = ["//visibility:public"],
22+
)
23+
24+
crates_vendor(
25+
name = "crates_vendor",
26+
cargo_lockfile = "//bazel/cargo/wasmtime:Cargo.Bazel.lock",
27+
manifests = ["//bazel/cargo/wasmtime:Cargo.toml"],
28+
mode = "remote",
29+
tags = ["manual"],
30+
vendor_path = "//bazel/cargo/wasmtime/remote",
6631
)

0 commit comments

Comments
 (0)