anistark / anistark/wasmrun

enhancement: component detection and Component Model parser

オープン
#94 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。