feat: integrate synth — WASM-to-ARM compiler as a hermetic toolchain - #468
Merged
Conversation
synth (pulseengine/synth) published its first real release — v0.3.1, with 4 platform binaries + SHA256SUMS — so it can now be a first-class downloaded toolchain instead of a user-supplied binary. synth is the final stage of the PulseEngine pipeline: it AOT-compiles a WASM core module to an ARM Cortex-M ELF. - checksums/tools/synth.json — JSON registry entry, 4 platforms (no Windows), verified SHA256 - toolchains/tool_registry.bzl — synth URL pattern - toolchains/synth_toolchain.bzl + toolchains/BUILD.bazel — synth_toolchain_type - wasm/extensions.bzl — synth module extension - MODULE.bazel — register the synth toolchain - wasm/private/synth_compile.bzl — resolve the synth binary from the toolchain; the `synth` attr is now optional (escape hatch for a locally-built binary) rather than mandatory - examples/synth_example — compiles a core module to an ARM Cortex-M ELF Validated: //examples/synth_example:math_firmware builds — synth 0.3.1 downloads checksum-verified and emits a 32-bit ARM EABI5 ELF. Completes the tool-integration track (rivet DD-003): spar, witness, and now synth are all first-class toolchains — synth is no longer deferred. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Jun 14, 2026
avrabe
added a commit
that referenced
this pull request
Jun 14, 2026
…489) (#505) * feat(wasm): wasm_component_import — adopt a prebuilt .wasm component (#489) Adds a first-class rule to bring an already-built component (fetched release asset, vendored, or committed fixture) into the build graph as a WasmComponentInfo, so wasm_validate / wasm_optimize / meld_fuse / synth_compile / signing can consume it without rebuilding from source. Per the issue direction: - returns WasmComponentInfo (wasm_file set, component_type "component", profile "release", empty profile_variants, wit_info None) - optional caller-declared imports/exports (default empty — does not hard-fail on a stripped/opaque component) - wired into wasm/defs.bzl exports + a bzl_library in wasm/private/BUILD.bazel - examples/component_import_example: adopt-then-validate build_test Replaces the downstream adopt_wasm_component shim consumers (e.g. jess) carry. Closes #489 (item 1; item 2 synth_compile already landed in #468/v1.1.0). * fix(example): repoint wasm_component_import example at a real component The example referenced prebuilt_component.wasm, which was never committed, so //examples/component_import_example couldn't build. Point `wasm` at an existing built component (//examples/basic:hello_component) instead — hermetic (no binary in git) and proves the adopt -> validate path round-trips on a real component. Verified: bazel test //examples/component_import_example:component_import_test PASSES. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Ralf Anton Beier <rbeier57@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
synth (
pulseengine/synth) published its first real release — v0.3.1,with 4 platform binaries +
SHA256SUMS— so it graduates from "deferred" to afirst-class downloaded toolchain. synth is the final stage of the PulseEngine
pipeline: it AOT-compiles a WASM core module to an ARM Cortex-M ELF.
Until now
synth_compilerequired a mandatorysynthattr pointing at alocally-built binary (synth had no releases). This PR adds the toolchain and
makes the rule use it.
Changes
checksums/tools/synth.json— JSON registry entry; 4 platforms(darwin/linux × amd64/arm64 — synth publishes no Windows binary), verified SHA256
toolchains/tool_registry.bzl— synth URL patterntoolchains/synth_toolchain.bzl+toolchains/BUILD.bazel—synth_toolchain_type(stub-on-unsupported-platform pattern, like meld, so Windows builds that
don't touch
synth_compilestill resolve)wasm/extensions.bzl—synthmodule extensionMODULE.bazel— register the synth toolchainwasm/private/synth_compile.bzl— resolve the synth binary from thetoolchain; the
synthattr is now optional (escape hatch for alocally-built binary) rather than mandatory
examples/synth_example— compiles a core module to an ARM Cortex-M ELFValidation
//examples/synth_example:math_firmwarebuilds — synth 0.3.1 downloadschecksum-verified and emits a 32-bit ARM EABI5 ELF (the two exported
functions compiled to ARM machine code).
Completes the tool-integration track (rivet
DD-003): spar, witness, and nowsynth are all first-class toolchains. synth is no longer deferred.
🤖 Generated with Claude Code