feat(gust): cross-arch matrix — one wasm lowers to ARM and RISC-V with the seam intact - #233
Merged
Conversation
…h the seam intact The thin-seam drivers are written once and lowered from the same wasm to both Cortex-M and RV32. Six of eight now cross completely, with the same defined-function count and the same seam width on each target; deterministic across runs. This was impossible until today. synth#871 — filed from this repo this morning, after the RV32 backend was found to decline every seam-importing function — was fixed the same day in synth 0.52.0 (auipc/jalr + R_RISCV_CALL_PLT into .rela.text). The gate is the undefined-symbol count, not the byte count, and that is deliberate. Under 0.49 the RISC-V backend silently dropped functions containing imported calls, so wdg-thin emitted a *smaller* object with no undefined symbols at all. Smaller and hollow. An object whose gust:hal calls have vanished has not been ported. So build-cross-arch.sh fails if either object has zero undefined seam symbols. Boundary stated in the doc: the RISC-V objects are compiled and seam-correct but NOT executed, and could not meaningfully be — these carry STM32 register maps, so a faithful RV32 silicon result needs an RV32 target model that does not exist yet. ARM remains the only executed leg (two dies). Import-free gust_mix already has real ESP32-C3 numbers; that is execution evidence, this is lowering evidence, and they are different claims. Two functions still decline (synth#882): wdg_unlock on an unsupported BrTable, and i2c_step on an undefined label, which reads like an emit defect rather than a gap. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011QG86sovTbfnPNY9SfhSmo
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Moves the biggest item off the Research Day cut's WON'T list.
What changed
Until this morning, no thin-seam driver crossed to RISC-V: synth's RV32 backend declined every function containing an imported call. That was filed as synth#871 and fixed the same day in synth 0.52.0 (
auipc/jalr+R_RISCV_CALL_PLTinto.rela.text).Re-measured on our actual drivers:
Six of eight lower completely on both, same function count, same seam width. Deterministic.
The gate is the undefined-symbol count, not size
Under 0.49,
wdg-thinlowered to a 468 B RV32 object with 2 defined functions and zero undefined symbols — smaller than the ARM object, and hollow: everygust:halcall had been silently dropped. Sobuild-cross-arch.shfails if either object has no undefined seam symbols. A smaller object is exactly what the failure looks like.Honest boundary (in the doc, not just here)
gust_mixalready has real ESP32-C3 silicon numbers (1.839x). That is execution evidence; this table is lowering evidence. Different claims, kept apart.Also measured
0.52.0 shrank every ARM object, no regressions — −122 B across the suite, including gpio-thin 534 → 502 B (relevant to synth#846). This PR does not re-pin the toolchain; the committed
.ofiles stay on 0.49 pending a silicon re-run.🤖 Generated with Claude Code
https://claude.ai/code/session_011QG86sovTbfnPNY9SfhSmo