Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# Disable Bzlmod
common --noenable_bzlmod

# Force Bazel to use --target=wasm32-wasip1
build --platforms=@rules_rust//rust/platform:wasi
9 changes: 9 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,15 @@ jobs:
- name: Build (wasm32-unknown-unknown)
run: bazelisk --noworkspace_rc build --noenable_bzlmod --platforms=@rules_rust//rust/platform:wasm //...

- name: Build (wasm32-unknown-unknown/bzlmod)
run: bazelisk --noworkspace_rc build --enable_bzlmod --platforms=@rules_rust//rust/platform:wasm //...

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

- name: Build (wasm32-wasip1/bzlmod)
run: bazelisk --noworkspace_rc build --enable_bzlmod --platforms=@rules_rust//rust/platform:wasi //...

- name: Format (buildifier)
run: |
buildifier -mode=check -r .
Expand All @@ -99,6 +105,9 @@ jobs:
bazelisk --noworkspace_rc run --noenable_bzlmod //bazel/cargo:crates_vendor
git diff --exit-code
- name: Format (MODULE.bazel.lock)
run: bazelisk mod deps --lockfile_mode=error

msrv:
runs-on: ubuntu-24.04

Expand Down
56 changes: 56 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module(
name = "proxy_wasm_rust_sdk",
version = "0.2.5-dev",
)

# Regular dependencies (sorted alphabetically).
bazel_dep(name = "bazel_features", version = "1.38.0")
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "rules_cc", version = "0.2.14")
bazel_dep(name = "rules_rust", version = "0.67.0")
single_version_override(
module_name = "rules_rust",
patch_strip = 1,
patches = [
"//bazel:rules_rust.patch",
],
version = "0.67.0",
)

# Configure Rust toolchain.
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2018",
versions = ["1.90.0"],
)
use_repo(rust, "rust_toolchains")

register_toolchains(
"@rust_toolchains//:all",
# Dummy C/C++ toolchains for Wasm targets.
"@rules_rust//rust/private/dummy_cc_toolchain:dummy_cc_wasm32_toolchain",
"@rules_rust//rust/private/dummy_cc_toolchain:dummy_cc_wasm64_toolchain",
)

# Cargo dependencies.
crates_deps = use_extension("//bazel:extensions.bzl", "crates_deps")
use_repo(
crates_deps,
"crates_vendor",
"crates_vendor__hashbrown-0.16.0",
"crates_vendor__log-0.4.27",
)
Loading
Loading