Add support for snapshotting tables
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia tracciando i percorsi di instrumentation e snapshotting di Wizer descritti nell’issue; non sono indicati file o test. Determina come rappresentare le identità di funcref tra istanze collegate e come gestire le funzioni importate e WASI, preservando il comportamento di inizializzazione di externref. Il lavoro è completato quando entrambi i tipi di tabella possono essere sottoposti a snapshot con i casi di module-linking coperti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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...
- Lingua principale
- Rust
- Stelle
- 1.1k
- Fork
- 64
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bytecodealliance/wizer
-
Broken link (2021 WebAssembly Summit)Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
bytecodealliance/wizer#130 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
bytecodealliance/wizer#153 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
bytecodealliance/wizer#126 ·
-
Monotonic clock offsettingAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
bytecodealliance/wizer#125 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 32/100
bytecodealliance/wizer#105 · 1 commento ·
Tutte le issue di bytecodealliance/wizer
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
wormhole-foundation/wormhole#5062 ·
I maintainer di solito rispondono entro 1 giorno
-
RUSTSEC-2026-0348: Brotli certificate decompression can allocate up to 1 GiB before authenticationAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 62/100
-
core: Amount::from_str panics on values above 21M BTC instead of returning an errorForse già presa @bhuvan-somisetty l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
crate: spate-s3
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno