Skip to content

Commit f352a8d

Browse files
authored
Move Bazel to //bazel. (#29)
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
1 parent b2ad59c commit f352a8d

24 files changed

+48
-48
lines changed

.github/workflows/rust.yml

Lines changed: 8 additions & 8 deletions
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', 'cargo/Cargo.lock') }}
60+
key: ${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.lock') }}
6161

6262
- name: Build
6363
run: bazelisk build //...
@@ -73,10 +73,10 @@ jobs:
7373
- name: Format (cargo raze)
7474
run: |
7575
cargo install cargo-raze --version 0.3.8
76-
cp -p cargo/Cargo.lock .
77-
rm -rf cargo/
78-
cargo raze --output=cargo
79-
mv Cargo.lock cargo/
76+
cp -p bazel/cargo/Cargo.lock .
77+
rm -rf bazel/cargo/
78+
cargo raze --output=bazel/cargo
79+
mv Cargo.lock bazel/cargo/
8080
git diff --exit-code
8181
8282
stable:
@@ -155,10 +155,10 @@ jobs:
155155
- name: Run cargo outdated
156156
run: cargo outdated --exit-code 1
157157

158-
- name: Check freshness of cargo/Cargo.lock
158+
- name: Check freshness of bazel/cargo/Cargo.lock
159159
run: |
160160
cargo generate-lockfile
161-
mv Cargo.lock cargo/
161+
mv Cargo.lock bazel/cargo/
162162
git diff --exit-code
163163
164164
audit:
@@ -169,5 +169,5 @@ jobs:
169169

170170
- name: Run cargo audit
171171
run: |
172-
cp -p cargo/Cargo.lock .
172+
cp -p bazel/cargo/Cargo.lock .
173173
cargo audit

BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ rust_library(
66
edition = "2018",
77
visibility = ["//visibility:public"],
88
deps = [
9-
"//cargo:hashbrown",
10-
"//cargo:log",
11-
"//cargo:wee_alloc",
9+
"//bazel/cargo:hashbrown",
10+
"//bazel/cargo:log",
11+
"//bazel/cargo:wee_alloc",
1212
],
1313
)

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ opt-level = 3
2222
panic = "abort"
2323

2424
[raze]
25-
workspace_path = "//cargo"
25+
workspace_path = "//bazel/cargo"
2626
target = "wasm32-unknown-unknown"
2727
genmode = "Remote"
2828

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ load("@io_bazel_rules_rust//:workspace.bzl", "bazel_version")
3232

3333
bazel_version(name = "bazel_version")
3434

35-
load("//cargo:crates.bzl", "raze_fetch_remote_crates")
35+
load("//bazel/cargo:crates.bzl", "raze_fetch_remote_crates")
3636

3737
raze_fetch_remote_crates()
File renamed without changes.
File renamed without changes.

cargo/crates.bzl renamed to bazel/cargo/crates.bzl

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def raze_fetch_remote_crates():
2222
type = "tar.gz",
2323
sha256 = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217",
2424
strip_prefix = "ahash-0.3.8",
25-
build_file = Label("//cargo/remote:ahash-0.3.8.BUILD"),
25+
build_file = Label("//bazel/cargo/remote:ahash-0.3.8.BUILD"),
2626
)
2727

2828
_new_http_archive(
@@ -31,7 +31,7 @@ def raze_fetch_remote_crates():
3131
type = "tar.gz",
3232
sha256 = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d",
3333
strip_prefix = "autocfg-1.0.0",
34-
build_file = Label("//cargo/remote:autocfg-1.0.0.BUILD"),
34+
build_file = Label("//bazel/cargo/remote:autocfg-1.0.0.BUILD"),
3535
)
3636

3737
_new_http_archive(
@@ -40,7 +40,7 @@ def raze_fetch_remote_crates():
4040
type = "tar.gz",
4141
sha256 = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822",
4242
strip_prefix = "cfg-if-0.1.10",
43-
build_file = Label("//cargo/remote:cfg-if-0.1.10.BUILD"),
43+
build_file = Label("//bazel/cargo/remote:cfg-if-0.1.10.BUILD"),
4444
)
4545

4646
_new_http_archive(
@@ -49,7 +49,7 @@ def raze_fetch_remote_crates():
4949
type = "tar.gz",
5050
sha256 = "942f72db697d8767c22d46a598e01f2d3b475501ea43d0db4f16d90259182d0b",
5151
strip_prefix = "chrono-0.4.15",
52-
build_file = Label("//cargo/remote:chrono-0.4.15.BUILD"),
52+
build_file = Label("//bazel/cargo/remote:chrono-0.4.15.BUILD"),
5353
)
5454

5555
_new_http_archive(
@@ -58,7 +58,7 @@ def raze_fetch_remote_crates():
5858
type = "tar.gz",
5959
sha256 = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25",
6060
strip_prefix = "hashbrown-0.8.2",
61-
build_file = Label("//cargo/remote:hashbrown-0.8.2.BUILD"),
61+
build_file = Label("//bazel/cargo/remote:hashbrown-0.8.2.BUILD"),
6262
)
6363

6464
_new_http_archive(
@@ -67,7 +67,7 @@ def raze_fetch_remote_crates():
6767
type = "tar.gz",
6868
sha256 = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10",
6969
strip_prefix = "libc-0.2.74",
70-
build_file = Label("//cargo/remote:libc-0.2.74.BUILD"),
70+
build_file = Label("//bazel/cargo/remote:libc-0.2.74.BUILD"),
7171
)
7272

7373
_new_http_archive(
@@ -76,7 +76,7 @@ def raze_fetch_remote_crates():
7676
type = "tar.gz",
7777
sha256 = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b",
7878
strip_prefix = "log-0.4.11",
79-
build_file = Label("//cargo/remote:log-0.4.11.BUILD"),
79+
build_file = Label("//bazel/cargo/remote:log-0.4.11.BUILD"),
8080
)
8181

8282
_new_http_archive(
@@ -85,7 +85,7 @@ def raze_fetch_remote_crates():
8585
type = "tar.gz",
8686
sha256 = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3",
8787
strip_prefix = "memory_units-0.4.0",
88-
build_file = Label("//cargo/remote:memory_units-0.4.0.BUILD"),
88+
build_file = Label("//bazel/cargo/remote:memory_units-0.4.0.BUILD"),
8989
)
9090

9191
_new_http_archive(
@@ -94,7 +94,7 @@ def raze_fetch_remote_crates():
9494
type = "tar.gz",
9595
sha256 = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b",
9696
strip_prefix = "num-integer-0.1.43",
97-
build_file = Label("//cargo/remote:num-integer-0.1.43.BUILD"),
97+
build_file = Label("//bazel/cargo/remote:num-integer-0.1.43.BUILD"),
9898
)
9999

100100
_new_http_archive(
@@ -103,7 +103,7 @@ def raze_fetch_remote_crates():
103103
type = "tar.gz",
104104
sha256 = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611",
105105
strip_prefix = "num-traits-0.2.12",
106-
build_file = Label("//cargo/remote:num-traits-0.2.12.BUILD"),
106+
build_file = Label("//bazel/cargo/remote:num-traits-0.2.12.BUILD"),
107107
)
108108

109109
_new_http_archive(
@@ -112,7 +112,7 @@ def raze_fetch_remote_crates():
112112
type = "tar.gz",
113113
sha256 = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438",
114114
strip_prefix = "time-0.1.43",
115-
build_file = Label("//cargo/remote:time-0.1.43.BUILD"),
115+
build_file = Label("//bazel/cargo/remote:time-0.1.43.BUILD"),
116116
)
117117

118118
_new_http_archive(
@@ -121,7 +121,7 @@ def raze_fetch_remote_crates():
121121
type = "tar.gz",
122122
sha256 = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e",
123123
strip_prefix = "wee_alloc-0.4.5",
124-
build_file = Label("//cargo/remote:wee_alloc-0.4.5.BUILD"),
124+
build_file = Label("//bazel/cargo/remote:wee_alloc-0.4.5.BUILD"),
125125
)
126126

127127
_new_http_archive(
@@ -130,7 +130,7 @@ def raze_fetch_remote_crates():
130130
type = "tar.gz",
131131
sha256 = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419",
132132
strip_prefix = "winapi-0.3.9",
133-
build_file = Label("//cargo/remote:winapi-0.3.9.BUILD"),
133+
build_file = Label("//bazel/cargo/remote:winapi-0.3.9.BUILD"),
134134
)
135135

136136
_new_http_archive(
@@ -139,7 +139,7 @@ def raze_fetch_remote_crates():
139139
type = "tar.gz",
140140
sha256 = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6",
141141
strip_prefix = "winapi-i686-pc-windows-gnu-0.4.0",
142-
build_file = Label("//cargo/remote:winapi-i686-pc-windows-gnu-0.4.0.BUILD"),
142+
build_file = Label("//bazel/cargo/remote:winapi-i686-pc-windows-gnu-0.4.0.BUILD"),
143143
)
144144

145145
_new_http_archive(
@@ -148,6 +148,6 @@ def raze_fetch_remote_crates():
148148
type = "tar.gz",
149149
sha256 = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f",
150150
strip_prefix = "winapi-x86_64-pc-windows-gnu-0.4.0",
151-
build_file = Label("//cargo/remote:winapi-x86_64-pc-windows-gnu-0.4.0.BUILD"),
151+
build_file = Label("//bazel/cargo/remote:winapi-x86_64-pc-windows-gnu-0.4.0.BUILD"),
152152
)
153153

File renamed without changes.

cargo/remote/ahash-0.3.8.BUILD renamed to bazel/cargo/remote/ahash-0.3.8.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/autocfg-1.0.0.BUILD renamed to bazel/cargo/remote/autocfg-1.0.0.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/cfg-if-0.1.10.BUILD renamed to bazel/cargo/remote/cfg-if-0.1.10.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/chrono-0.4.15.BUILD renamed to bazel/cargo/remote/chrono-0.4.15.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/hashbrown-0.8.2.BUILD renamed to bazel/cargo/remote/hashbrown-0.8.2.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/libc-0.2.74.BUILD renamed to bazel/cargo/remote/libc-0.2.74.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/log-0.4.11.BUILD renamed to bazel/cargo/remote/log-0.4.11.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/memory_units-0.4.0.BUILD renamed to bazel/cargo/remote/memory_units-0.4.0.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/num-integer-0.1.43.BUILD renamed to bazel/cargo/remote/num-integer-0.1.43.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/num-traits-0.2.12.BUILD renamed to bazel/cargo/remote/num-traits-0.2.12.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/time-0.1.43.BUILD renamed to bazel/cargo/remote/time-0.1.43.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/wee_alloc-0.4.5.BUILD renamed to bazel/cargo/remote/wee_alloc-0.4.5.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/winapi-0.3.9.BUILD renamed to bazel/cargo/remote/winapi-0.3.9.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/winapi-i686-pc-windows-gnu-0.4.0.BUILD renamed to bazel/cargo/remote/winapi-i686-pc-windows-gnu-0.4.0.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

cargo/remote/winapi-x86_64-pc-windows-gnu-0.4.0.BUILD renamed to bazel/cargo/remote/winapi-x86_64-pc-windows-gnu-0.4.0.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO NOT EDIT! Replaced on runs of cargo-raze
66
package(default_visibility = [
77
# Public for visibility by "@raze__crate__version//" targets.
88
#
9-
# Prefer access through "//cargo", which limits external
9+
# Prefer access through "//bazel/cargo", which limits external
1010
# visibility to explicit Cargo.toml dependencies.
1111
"//visibility:public",
1212
])

examples/BUILD

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ rust_binary(
88
out_binary = True,
99
deps = [
1010
"//:proxy_wasm",
11-
"//cargo:chrono",
12-
"//cargo:log",
11+
"//bazel/cargo:chrono",
12+
"//bazel/cargo:log",
1313
],
1414
)
1515

@@ -21,7 +21,7 @@ rust_binary(
2121
out_binary = True,
2222
deps = [
2323
"//:proxy_wasm",
24-
"//cargo:log",
24+
"//bazel/cargo:log",
2525
],
2626
)
2727

@@ -33,7 +33,7 @@ rust_binary(
3333
out_binary = True,
3434
deps = [
3535
"//:proxy_wasm",
36-
"//cargo:log",
36+
"//bazel/cargo:log",
3737
],
3838
)
3939

@@ -45,6 +45,6 @@ rust_binary(
4545
out_binary = True,
4646
deps = [
4747
"//:proxy_wasm",
48-
"//cargo:log",
48+
"//bazel/cargo:log",
4949
],
5050
)

0 commit comments

Comments
 (0)