Skip to content

fix: resolve all codegen test failures and WASM build warnings#17

Merged
slepp merged 1 commit intomainfrom
fix/codegen-test-failures
Feb 26, 2026
Merged

fix: resolve all codegen test failures and WASM build warnings#17
slepp merged 1 commit intomainfrom
fix/codegen-test-failures

Conversation

@slepp
Copy link
Contributor

@slepp slepp commented Feb 25, 2026

Summary

  • Fix hashmap contains_key codegen: emit i1 (bool) instead of i32, matching the MLIR op definition — fixes 5 native + 5 WASM hashmap tests
  • Fix WASM runtime build: profiler stub referenced wasm-excluded modules (cluster, connection, routing); bridge offset assertions hardcoded 64-bit values — fixes all 133 WASM test failures
  • Eliminate all static_mut_refs warnings: replace static mut with Mutex in actor tracking and WASM registry, remove dead WasmCell type, gate native-only helpers, add missing Debug derive

Test plan

  • ctest — 438/438 codegen tests pass (was 300/438)
  • cargo build -p hew-runtime --target wasm32-wasip1 --no-default-features — zero warnings
  • cargo test -p hew-runtime --all-features — 6 integration tests pass
  • cargo test -p hew-lexer -p hew-parser -p hew-types -p hew-lsp — all pass
  • cargo build -p hew-runtime — native build clean

- Fix hashmap contains_key codegen: emit i1 (bool) instead of i32,
  matching the MLIR op definition (fixes 5 native + 5 WASM tests)
- Fix WASM runtime build: use *mut c_void in profiler stub to avoid
  referencing wasm-excluded cluster/connection/routing modules
- Fix bridge.rs offset assertions: add wasm32 (32-bit pointer) values
  alongside existing 64-bit assertions
- Remove dead WasmCell type from bridge.rs (replaced by OnceLock<Mutex>)
- Eliminate all static_mut_refs warnings: replace static mut with Mutex
  in actor tracking (actor.rs) and WASM registry (registry.rs)
- Gate vec byte-conversion helpers for native-only (fixes dead_code)
- Add missing Debug derive on WasmReplyChannel

All 438 codegen tests now pass (was 300/438). WASM runtime builds
with zero warnings.
@slepp slepp merged commit bc4ef48 into main Feb 26, 2026
3 of 4 checks passed
@slepp slepp deleted the fix/codegen-test-failures branch February 26, 2026 06:02
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