Skip to content

Commit aefc51a

Browse files
committed
Provide MODULE.bazel support
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 parent b3d3815 commit aefc51a

File tree

5 files changed

+142
-6
lines changed

5 files changed

+142
-6
lines changed

.bazelrc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
# Disable Bzlmod
2-
common --noenable_bzlmod
3-
41
# Force Bazel to use --target=wasm32-wasip1
52
build --platforms=@rules_rust//rust/platform:wasi

.github/workflows/rust.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,18 @@ jobs:
8585
export PATH=$PATH:$(go env GOPATH)/bin
8686
8787
- name: Build (wasm32-unknown-unknown)
88-
run: bazelisk --noworkspace_rc build --noenable_bzlmod --platforms=@rules_rust//rust/platform:wasm //...
88+
run: bazelisk --noworkspace_rc build --platforms=@rules_rust//rust/platform:wasm //...
8989

9090
- name: Build (wasm32-wasip1)
91-
run: bazelisk --noworkspace_rc build --noenable_bzlmod --platforms=@rules_rust//rust/platform:wasi //...
91+
run: bazelisk --noworkspace_rc build --platforms=@rules_rust//rust/platform:wasi //...
9292

9393
- name: Format (buildifier)
9494
run: |
9595
buildifier -mode=check -r .
9696
9797
- name: Format (rules_rust)
9898
run: |
99-
bazelisk --noworkspace_rc run --noenable_bzlmod //bazel/cargo:crates_vendor
99+
bazelisk --noworkspace_rc run //bazel/cargo:crates_vendor
100100
git diff --exit-code
101101
102102
msrv:

MODULE.bazel

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2025 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+
module(
16+
name = "proxy_wasm_rust_sdk",
17+
version = "0.2.5-dev",
18+
)
19+
20+
# Regular dependencies (sorted alphabetically)
21+
bazel_dep(name = "bazel_features", version = "1.38.0")
22+
bazel_dep(name = "bazel_skylib", version = "1.8.2")
23+
bazel_dep(name = "rules_cc", version = "0.2.14")
24+
bazel_dep(name = "rules_rust", version = "0.67.0")
25+
26+
# Configure Rust toolchain
27+
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
28+
rust.toolchain(edition = "2018")
29+
use_repo(rust, "rust_toolchains")
30+
31+
register_toolchains("@rust_toolchains//:all")

MODULE.bazel.lock

Lines changed: 95 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WORKSPACE.bzlmod

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2025 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.

0 commit comments

Comments
 (0)