diff --git a/WORKSPACE b/WORKSPACE index 4261aeed..96958789 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -4,6 +4,14 @@ load("@proxy_wasm_rust_sdk//bazel:repositories.bzl", "proxy_wasm_rust_sdk_reposi proxy_wasm_rust_sdk_repositories() -load("@proxy_wasm_rust_sdk//bazel:dependencies.bzl", "proxy_wasm_rust_sdk_dependencies") +load("@proxy_wasm_rust_sdk//bazel:dependencies_bazel.bzl", "proxy_wasm_rust_sdk_dependencies_bazel") -proxy_wasm_rust_sdk_dependencies() +proxy_wasm_rust_sdk_dependencies_bazel() + +load("@proxy_wasm_rust_sdk//bazel:dependencies_compat.bzl", "proxy_wasm_rust_sdk_dependencies_compat") + +proxy_wasm_rust_sdk_dependencies_compat() + +load("@proxy_wasm_rust_sdk//bazel:dependencies_crates.bzl", "proxy_wasm_rust_sdk_dependencies_crates") + +proxy_wasm_rust_sdk_dependencies_crates() diff --git a/bazel/dependencies_bazel.bzl b/bazel/dependencies_bazel.bzl new file mode 100644 index 00000000..08fcca65 --- /dev/null +++ b/bazel/dependencies_bazel.bzl @@ -0,0 +1,18 @@ +# 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. + +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +def proxy_wasm_rust_sdk_dependencies_bazel(): + bazel_features_deps() diff --git a/bazel/dependencies_compat.bzl b/bazel/dependencies_compat.bzl new file mode 100644 index 00000000..4a9c4938 --- /dev/null +++ b/bazel/dependencies_compat.bzl @@ -0,0 +1,18 @@ +# 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. + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +def proxy_wasm_rust_sdk_dependencies_compat(): + compatibility_proxy_repo() diff --git a/bazel/dependencies.bzl b/bazel/dependencies_crates.bzl similarity index 94% rename from bazel/dependencies.bzl rename to bazel/dependencies_crates.bzl index ec69cafa..680cf539 100644 --- a/bazel/dependencies.bzl +++ b/bazel/dependencies_crates.bzl @@ -16,7 +16,7 @@ load("@proxy_wasm_rust_sdk//bazel/cargo/remote:defs.bzl", "crate_repositories") load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies") load("@rules_rust//rust:repositories.bzl", "rust_repositories") -def proxy_wasm_rust_sdk_dependencies(): +def proxy_wasm_rust_sdk_dependencies_crates(): rust_repositories() crate_universe_dependencies() crate_repositories() diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index eddfd70e..68e94e8a 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -16,12 +16,20 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") def proxy_wasm_rust_sdk_repositories(): + maybe( + http_archive, + name = "bazel_features", + sha256 = "07271d0f6b12633777b69020c4cb1eb67b1939c0cf84bb3944dc85cc250c0c01", + url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.38.0/bazel_features-v1.38.0.tar.gz", + strip_prefix = "bazel_features-1.38.0", + ) + maybe( http_archive, name = "rules_cc", - sha256 = "4b12149a041ddfb8306a8fd0e904e39d673552ce82e4296e96fac9cbf0780e59", - url = "https://github.com/bazelbuild/rules_cc/releases/download/0.1.0/rules_cc-0.1.0.tar.gz", - strip_prefix = "rules_cc-0.1.0", + sha256 = "a2fdfde2ab9b2176bd6a33afca14458039023edb1dd2e73e6823810809df4027", + url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.14/rules_cc-0.2.14.tar.gz", + strip_prefix = "rules_cc-0.2.14", ) maybe(