enhancement: component detection and Component Model parser
- 主要言語
- Rust
- スター
- 48
- フォーク
- 4
- 平均マージ
- 20時間 13分
- マージ済み PR(30日)
- 11
説明
Tracked by #92
## Goal
Detect WebAssembly components and parse the Component Model binary format, dispatching core modules to the existing 0.1 engine and components to a new path.
## Scope
- Read header bytes 4-7 to distinguish a core module (`01 00 00 00`) from a component (`0d 00 01 00`). The parser currently only checks magic bytes: https://github.com/anistark/wasmrun/blob/d3b760c/src/runtime/core/module.rs#L158
- Parse component sections: embedded core modules, component/instance types, instantiation, alias, and canon sections.
- Add a dispatch seam so `run` routes module vs component automatically (no user flag).
- Read imported interface version strings to identify the WASI version (`@0.2.x` vs `@0.3.x`).
## Acceptance criteria
- wasmrun correctly classifies a `.wasm` as module vs component.
- A trivial component parses without executing host imports yet.
- `wasm_analysis` / module inspection reports the detected kind + WASI version.
## Depends on
- #92 Phase 0 (reference types)
コントリビューションガイド
評価
この issue はまだ評価されていません。