Skip to content

feat: meld native toolchain + synth attr cleanup#444

Merged
avrabe merged 1 commit intomainfrom
feat/meld-native-toolchain
Apr 19, 2026
Merged

feat: meld native toolchain + synth attr cleanup#444
avrabe merged 1 commit intomainfrom
feat/meld-native-toolchain

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 19, 2026

Summary

  • Wires meld_fuse to resolve the meld CLI via a real Bazel toolchain (meld_toolchain_type) instead of an unbound private _meld attribute, which was previously unusable.
  • Adds meld_repository that downloads the native meld binary from the JSON registry via tool_registry, plus a module extension in //wasm:extensions.bzl.
  • Handles platforms without a published meld binary (Windows today) by emitting a stub toolchain gated on @platforms//:incompatible — module resolution succeeds and meld_fuse targets are cleanly filtered out.
  • Promotes synth_compile's _synth private attribute to a public mandatory synth attribute, reflecting that synth has no published releases and users must supply a locally built binary.

Context

This is the first follow-up to #442: the pipeline rules landed there but meld_fuse had no toolchain path, so the rule couldn't actually be invoked. This PR makes it executable end-to-end on supported platforms (linux_{amd64,arm64}, darwin_{amd64,arm64}).

Test plan

  • bazel build //wasm:defs //toolchains:meld_toolchain_type — loads cleanly
  • bazel fetch @meld_toolchain//... — downloads native binary via registry
  • meld --help from downloaded binary — confirms executable
  • bazel build --nobuild //wasm/... //toolchains/... //providers/... — 54 targets analyze
  • bazel build --nobuild //examples/basic/... //examples/wizer_example/... //examples/aot_example/... //examples/wasm_signing/... //examples/wac_oci_composition/... — 125 targets analyze, no regressions
  • CI green across Linux/macOS/Windows (Windows takes the stub path)

🤖 Generated with Claude Code

Wires meld_fuse to resolve the meld CLI via a proper Bazel toolchain
instead of an unbound private attribute. Adds `meld_toolchain_type`,
a `meld_repository` rule that downloads the native binary from the
JSON registry, and a module extension to expose it. Platforms without
a published meld binary (Windows today) get a stub toolchain gated by
@platforms//:incompatible so module resolution succeeds but meld_fuse
targets are correctly filtered out.

synth_compile's `_synth` private attribute is promoted to a public
mandatory `synth` attribute since synth has no published releases —
users must point at a locally built binary, which is now an honest
part of the rule API.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@avrabe avrabe merged commit 033a676 into main Apr 19, 2026
29 of 30 checks passed
@avrabe avrabe deleted the feat/meld-native-toolchain branch April 19, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant