Add support for snapshotting tables
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
まず、issue に記載されている Wizer の instrumentation と snapshotting のパスを追跡します。ファイルやテストは指定されていません。リンクされたインスタンス間で funcref の identity をどのように表現するか、また imported 関数と WASI 関数をどのように扱うかを判断し、externref の初期化動作を維持します。両方の table kind を snapshot でき、module-linking のケースがカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Right now there are two potential kinds of tables:
funcreftablesexternreftables
The latter are easy to support, since Wasm can't construct an externref, only receive it from the outside world. As long as we don't allow any externrefs into the Wasm during initialization, then all we have to do is record the initialized size of these tables.
funcref tables are a little harder. Wasm can create funcrefs via the ref.func instruction. So we need a way to figure out which function each wasmtime::FuncRef in a table we are snapshotting is (i.e. what is the local function index of the ith table element?). wasmtime doesn't expose anything like that. I have an idea, however:
- during Wizer's instrumentation phase:
- add two new globals to the module:
$wizer_getting_func_indexand$wizer_func_index - add the following snippet to the start of every function in the module:
block global.get $wizer_getting_func_index i32.eqz br_if 0 i32.const <this function's local index> global.set $wizer_func_index unreachable end
- add two new globals to the module:
- then, during snapshotting, to get a given
funcref's local function index, we set the$wizer_getting_func_indexglobal non-zero, call the function, and then it will set its local function index to the$wizer_func_indexglobal and trap. - the dummy functions we create for imports will need a similar dance, but implemented in native code rather than Wasm. Something similar for wasi functions too.
The one problem is that local function index isn't quite enough in the face of module linking. Instead we will need both the instance "id" (whatever that this; DFS index?) as well as the local function index in that instance. More to think about w.r.t. module linking here...
- 主要言語
- Rust
- スター
- 1.1k
- フォーク
- 64
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/wizer のほかの issue
-
Broken link (2021 WebAssembly Summit)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
bytecodealliance/wizer#130 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
bytecodealliance/wizer#153 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
bytecodealliance/wizer#126 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
bytecodealliance/wizer#125 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 32/100
bytecodealliance/wizer#105 · コメント 1 件 ·
bytecodealliance/wizer の issue をすべて見る
似ている issue
-
area: compat area: parsing bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
reubeno/brush#1526 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
OFN writer emits `DocIRI` as a bare IRI, which becomes a version IRI or a parse error on re-readオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
phillord/horned-owl#338 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
stackabletech/operator-rs#1301 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
jmcnamara/rust_xlsxwriter#205 · コメント 4 件 ·