Obtaining deferred namespace imports

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

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

評価

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

調査の方向性

Start by reading the linked TC39 deferred evaluation proposal and WebAssembly ESM integration issue 101, then compare the proposed namespace and deferred-namespace import conventions with the ESM integration semantics described here. Done means reaching an agreed convention and implementing support for obtaining the corresponding JavaScript module namespace objects.

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

説明

The deferred evaluation proposal (https://github.com/tc39/proposal-defer-import-eval) is at Stage 3 in TC39 and starting to be implemented now.

We naturally support this in the ESM integration for deferring WebAssembly evaluation as already tracked in https://github.com/WebAssembly/esm-integration/issues/101, but what we do not support is obtaining access to deferred JS namespaces.

This means that WebAssembly cannot import other modules in a way that indicates their execution should be deferred, like JS will be able to do.

The reason for this is that WebAssembly has no way to get the JS module namespace object itself currently as it only imports named exports directly.

For the ESM integration only, the strawman proposal here is to support an import convention form that can be used to obtain the JS module namespace object:

(import "./mod.js" "wasm-js:namespace" (global $ns externref))
(import "./mod.js" "wasm-js:deferred-namespace" (global $ns externref))

In ECMA-262 this directly corresponds to the fact that ~namespace~ and ~deferred-namespace~ are already specified as being supported through the ResolveExport path on the module record, so that we are using the export name position for the convention is not purely a hack, but also matches the underlying specification semantics (see https://tc39.es/proposal-defer-import-eval/#abstract-resolveexport).

主要言語
WebAssembly
スター
458
フォーク
40
平均マージ
10日 37分
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

WebAssembly/esm-integration のほかの issue

WebAssembly/esm-integration の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

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

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