Add support for snapshotting tables
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Beginne damit, Wizers im Issue beschriebenen Instrumentierungs- und Snapshotting-Pfade nachzuverfolgen; es werden keine Dateien oder Tests genannt. Ermittle, wie sich funcref-Identitäten über verknüpfte Instanzen hinweg darstellen lassen und wie importierte und WASI-Funktionen behandelt werden, wobei das Initialisierungsverhalten von externref erhalten bleibt. Erledigt ist die Aufgabe, wenn beide Tabellentypen mit abgedeckten module-linking-Fällen gesnapshottet werden können.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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...
- Vorherrschende Sprache
- Rust
- Sterne
- 1.1k
- Forks
- 64
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus bytecodealliance/wizer
-
Broken link (2021 WebAssembly Summit)Evtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
bytecodealliance/wizer#130 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
bytecodealliance/wizer#153 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
bytecodealliance/wizer#126 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
bytecodealliance/wizer#125 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 32/100
bytecodealliance/wizer#105 · 1 Kommentar ·
Alle Issues in bytecodealliance/wizer
Ähnliche Issues
-
documentation good first issue
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 72/100
sujithputta02/Esapay#13 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
tursodatabase/turso#10002 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
topgrade-rs/topgrade#2419 ·
Maintainer antworten meist innerhalb von 1 Tag
-
review-bot
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
midagedev/bloomery#318 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Chia-Network/clvm_rs#863 ·
Maintainer antworten meist innerhalb von 1 Tag