Supporting a 'wasm:' prefix on imports
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, wasm
- 領域
- tooling
調査の方向性
まず ComponentizeJS の issue の議論を読み、示されている JavaScript imports がどのように処理されるかを追跡します。これには、ComponentizeJS の上と下にあると説明されている変更も含まれます。コミュニティが prefix に合意し、選択した形式が WASI または WebAssembly のコンポーネント imports でエンドツーエンドに機能して、初めて作業は完了です。
索引モデルが issue の本文から書いたものです。
説明
Right now, code that uses imports via WASI look like regular imports, with the package name being the first indicator:
import { someFn } from "ns:pkg/iface@0.1.0";
export const run = {
run() { ... }
}
This works, but I think going forward life for embedders and tooling/ecosystem projects will be much easier if we prefix these imports with wasi: (or something similar) to note them/control how the imports are done.
The idea is that the above code would turn into:
import { someFn } from "wasi:ns:pkg/iface@0.1.0";
export const run = {
run() { ... }
}
There are other ways to indicate the type of an import/control (i.e. import attributes, for example) , but prefixing with wasi: is incredibly simple and offers a point of leverage -- being able to easily tell which imports are "wasi"/underlying paltform imports. This mirrors the convention of node: as an import prefix which is used in more modern code bases (i.e. from "node:fs" rather than from "fs").
Changes may be required "below" and "above" componentize JS to make this work, but I figure that ComponentizeJS is a good place to discuss and eventually start this work.
[EDIT] I changed the title to wasm since wasi is clearly not the right prefix -- wasm:, wit:, component: or something else are clearly more correct, though it's not exactly clear which is best.
- 主要言語
- Rust
- スター
- 392
- フォーク
- 54
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 3
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/ComponentizeJS のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 56/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
bytecodealliance/ComponentizeJS#335 · コメント 3 件 ·
bytecodealliance/ComponentizeJS の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
stratum-mining/stratum#2404 ·
-
bug ci good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100