Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

wasm32-wasi: callable exports (reactor/library mode), then a Component Model target

オープン
#522 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
wasm
領域
compilers

調査の方向性

Start by tracing how scriptc build --lib handles wasm32-wasi and where SC3002 rejects the library-mode profile, then compare that with the existing native library mode. The first milestone is a WASI Preview 1 reactor with declared exports, _initialize, and no _start; later milestones cover Component Model/WIT output and wasi:http.

索引モデルが issue の本文から書いたものです。

説明

Would you consider supporting a wasm32-wasi build whose exported functions a host can call, rather than only a _start command module?

Today scriptc build --lib is refused on wasm32-wasi with SC3002, and the compiler notes that the archive/reactor contract is not supported for WASI. What we're after, smallest first:

  1. Reactor exports on WASI Preview 1. Accept the existing library-mode profile on wasm32-wasi and emit its declared exports as wasm exports, with _initialize for setup and no _start. The async-free restriction that native library mode already has would be fine for a first version.
  2. Component Model output (WASI 0.2 / wasm32-wasip2). Take a WIT world and generate its typed imports and exports, so the output is a component that validates against that world. A documented stopgap would also help, for example reactor module + wasm-tools component new with the preview1 reactor adapter + hand-written WIT.
  3. Later, wasi:http outgoing requests on the component target, so fetch can work where the host grants it.

The use case is function-shaped: a host calls handle(input) -> output many times on one instance, rather than running main once. The static tier's small output and lack of an embedded engine make scriptc a very good fit for that, apart from this gap.

This looks related to #265: a WASI reactor would face the same async question, and a host-callable drain export would answer it for both.

Is this on the roadmap, or something you'd accept? We're happy to test preview builds under Wasmtime.

主要言語
TypeScript
スター
5.1k
フォーク
130
平均マージ
1時間 13分
マージ済み PR(30日)
254

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

vercel-labs/scriptc のほかの issue

vercel-labs/scriptc の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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