Commit 5018e78
authored
fix(wasm): resolve E0308 — bet-wasm + whole Rust workspace build green (#64)
## Fix `bet-wasm` E0308 — whole Rust workspace now builds green
`bet-wasm` was the one Rust crate that didn't compile (long flagged
"paused"). The default-return scaffold's `match ret_ty` had
**incompatible arm types**: the `I32` arm was a statement block (`()`),
while `I64`/`F32`/`F64` were bare `func.instruction(...)` expressions
(which return `&mut Function`). The match is purely side-effecting (it
emits a default-return instruction; its value is unused), so all arms
are now `()` statement blocks.
### Verified (locally, via cargo)
- `cargo test -p bet-wasm` → **8 passed**
- `cargo build --workspace` → **exit 0** — every Rust crate now compiles
(bet-syntax, bet-parse, bet-core, bet-check, bet-eval, bet-codegen,
bet-wasm).
README status refreshed: WASM backend **paused → builds (scaffolding)**
— it compiles and emits default-return stubs; real AST→WASM lowering is
still pending (that's separate work, not claimed here).
### Scope
This is the **build-unblock only**. The other half of the "finish the
Rust pipeline" item — raising `bet-eval`/`bet-codegen` toward parity
with the authoritative Racket interpreter — remains follow-on work.
https://claude.ai/code/session_01QGi8GND5yNWgDyfReVEPYs
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QGi8GND5yNWgDyfReVEPYs)_1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
| 456 | + | |
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| |||
0 commit comments