Skip to content

Rename #[wasi("...")] attribute to #[cm("...")] for general CM support#751

Merged
gfx merged 2 commits intomainfrom
claude/refactor-wasi-to-cm-attribute-wJyuO
Apr 2, 2026
Merged

Rename #[wasi("...")] attribute to #[cm("...")] for general CM support#751
gfx merged 2 commits intomainfrom
claude/refactor-wasi-to-cm-attribute-wJyuO

Conversation

@gfx
Copy link
Copy Markdown
Member

@gfx gfx commented Apr 2, 2026

Summary

  • Rename #[wasi("...")] attribute to #[cm("...")] and #[wasi_params(...)] to #[cm_params(...)] so the attribute is reusable for any Component Model namespace, not just WASI
  • Rename internal types: WasiImportCmImport, wasi_importcm_import, WirWasiImportWirCmImport
  • Fix wado-from-wit to use the actual package namespace from WIT instead of hardcoding "wasi:"
  • Regenerate all wasi/*.wado stdlib files and update docs/fixtures

Test plan

  • All 317 compiler lib tests pass
  • All 4495 e2e tests pass
  • All 81 formatter tests pass
  • All 5 wado-from-wit tests pass
  • All 1278 wado module tests pass
  • on-task-done passes with 0 failures

https://claude.ai/code/session_01SAuHAY6kD8V36si1pZ6NCM

claude added 2 commits April 2, 2026 05:17
… CM support

The wasi attribute was WASI-specific but the CM bridge logic has nothing
WASI-specific. Renaming to #[cm("namespace:pkg/iface...")] makes it
reusable for any Component Model namespace. Also renames #[wasi_params]
to #[cm_params], WasiImport to CmImport, and updates all generated
wasi/*.wado stdlib files. Additionally fixes wado-from-wit to use the
actual package namespace instead of hardcoding "wasi:".

https://claude.ai/code/session_01SAuHAY6kD8V36si1pZ6NCM
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: aaacabc Previous: 0132b7a Ratio
sieve (-O3) 133 ms 62 ms 2.15

This comment was automatically generated by workflow using github-action-benchmark.

@gfx gfx enabled auto-merge April 2, 2026 05:58
@gfx gfx disabled auto-merge April 2, 2026 05:58
@gfx gfx merged commit 7cc44ce into main Apr 2, 2026
9 of 10 checks passed
@gfx gfx deleted the claude/refactor-wasi-to-cm-attribute-wJyuO branch April 2, 2026 06:03
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.

2 participants