Skip to content

Commit 2ff6185

Browse files
committed
fix: make rust_wasm_component main target provide WasmComponentInfo
Changed the main target from a filegroup to an alias pointing to the main profile component, so it provides the required WasmComponentInfo provider for rust_wasm_component_test and other rules that need it.
1 parent d1e70b9 commit 2ff6185

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

rust/rust_wasm_component.bzl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,17 +207,17 @@ def rust_wasm_component(
207207

208208
profile_variants[profile] = ":" + component_name
209209

210-
# Create a filegroup that includes all profiles
211-
native.filegroup(
210+
# Create the main component (default to release profile) that provides WasmComponentInfo
211+
main_profile = "release" if "release" in profiles else profiles[0]
212+
native.alias(
212213
name = name,
213-
srcs = [profile_variants[p] for p in profiles],
214+
actual = profile_variants[main_profile],
214215
visibility = visibility,
215216
)
216217

217-
# Create the main component (default to release profile)
218-
main_profile = "release" if "release" in profiles else profiles[0]
219-
native.alias(
220-
name = name + "_main",
221-
actual = profile_variants[main_profile],
218+
# Create a filegroup that includes all profiles for those who need it
219+
native.filegroup(
220+
name = name + "_all_profiles",
221+
srcs = [profile_variants[p] for p in profiles],
222222
visibility = visibility,
223223
)

0 commit comments

Comments
 (0)