Wasm/ESM integration and additional start/main functions
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, wasm
調査の方向性
Start by reviewing the Wasm/ESM integration MVP semantics and the linked WebAssembly design issue, Node.js WASI change, and command-style program discussion. Compare initialization patterns across Wasm toolchains and host environments, including the start and _start functions and exported memory. Done means a documented design for whether and how a custom section can standardize these behaviors.
索引モデルが issue の本文から書いたものです。
説明
When starting up a Wasm module or application, it's often not enough to call the Wasm start function. Often, there's some kind of external code driving it, maybe generated by the toolchain or otherwise present in the host environment.
One idea from https://github.com/WebAssembly/design/issues/1160 to reduce the need for this sort of "driver" code was to make Wasm/ESM integration call a secondary "_start" function, after the exports are initialized, to permit the driver module to have the Wasm exports before functions that it exports to Wasm are run. However, there are some cases which don't quite meet this model:
- Before calling the WASI
_startfunction, the exported memory could be passed into WASI https://github.com/nodejs/node/pull/27850/files#diff-ab9c666b48467c7030bd93aac6d06eb2R184 - For command-style programs, we may want to have a difference between running a command and using it https://github.com/WebAssembly/esm-integration/issues/30
I suspect, if we examine more systems, we'll find more kinds of mismatches or subtle cases where more behavior is needed.
The goal for this issue is to compile patterns from various Wasm toolchains and environments, and see what would make sense to standardize. This standard initialization behavior could be used both in JS and outside of JS environments, in common between the two.
I'd like to see if we can coalesce on the design of a new custom section to declaratively specify this initialization behavior. I think it will make sense to do on top of the basic Wasm module semantics, with the start function being invoked atomically with module initialization before exports are made available, as explained by @rossberg.
I think the MVP Wasm/ESM integration semantics make sense as is, and any further behavior will be a v2 that layers on top. If you disagree, I'd love to understand better why in this thread, so we can make it clear to potential implementers of Wasm/ESM integration whether this is stable.
cc @lukewagner @guybedford @xtuc
- 主要言語
- WebAssembly
- スター
- 458
- フォーク
- 40
- 平均マージ
- 10日 37分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WebAssembly/esm-integration のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
WebAssembly/esm-integration#122 ·
-
Supporting WebAssembly.JSTag import対応中かも @guybedford が 190 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
WebAssembly/esm-integration#120 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
WebAssembly/esm-integration#119 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
WebAssembly/esm-integration#118 · コメント 10 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
WebAssembly/esm-integration#112 · コメント 9 件 ·
WebAssembly/esm-integration の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
DAE2 crashes on call.without.effects with a non ref.func expression対応中かも @stevenfontanella が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
WebAssembly/binaryen#9404 ·
メンテナーはふだん 1 日以内に返信
-
area:compiler effort:S impact:med platform:windows type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
area:Analysis enhancement
難易度 1/5 1〜3時間 初心者へのやさしさ 69/100
facebookresearch/atlas-lean#5118 ·
メンテナーはふだん 1 日以内に返信
-
C-bugfix
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Quantinuum/hugr#3354 ·
メンテナーはふだん 1 日以内に返信