Skip to content

Commit 22b1e8e

Browse files
committed
fix: restore component toolchain usage and add it to wasm_validate rule
- Revert wasm_tools_actions.bzl to use wasm_tools_component_toolchain_type - Add component toolchain to wasm_validate rule alongside regular toolchain - This fixes both validate and rust component build targets
1 parent 78203d1 commit 22b1e8e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

tools/bazel_helpers/wasm_tools_actions.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ def wasm_tools_action(ctx, operation, **kwargs):
2424
"""
2525

2626
# Get the WASM tools component from toolchain
27-
wasm_tools_toolchain = ctx.toolchains["@rules_wasm_component//toolchains:wasm_tools_toolchain_type"]
28-
wasm_tools_component_target = wasm_tools_toolchain.wasm_tools
27+
wasm_tools_toolchain = ctx.toolchains["@rules_wasm_component//toolchains:wasm_tools_component_toolchain_type"]
28+
wasm_tools_info = wasm_tools_toolchain.wasm_tools_info
29+
wasm_tools_component_target = wasm_tools_info.wasm_tools_component
2930

3031
if not wasm_tools_component_target:
3132
fail("WASM Tools Integration Component not available in toolchain")

wasm/wasm_validate.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ wasm_validate = rule(
233233
doc = "GitHub account to retrieve public keys from",
234234
),
235235
},
236-
toolchains = ["@rules_wasm_component//toolchains:wasm_tools_toolchain_type"],
236+
toolchains = [
237+
"@rules_wasm_component//toolchains:wasm_tools_toolchain_type",
238+
"@rules_wasm_component//toolchains:wasm_tools_component_toolchain_type",
239+
],
237240
doc = """
238241
Validates a WebAssembly file or component with optional signature verification.
239242

0 commit comments

Comments
 (0)