Add support for snapshotting tables
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
Piste de recherche
Commencez par suivre les chemins d’instrumentation et de snapshotting de Wizer décrits dans l’issue ; aucun fichier ni test n’est nommé. Déterminez comment représenter les identités de funcref entre des instances liées et gérer les fonctions importées et WASI, tout en préservant le comportement d’initialisation d’externref. La tâche est terminée lorsque les deux types de tables peuvent être snapshotés avec les cas de module-linking couverts.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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...
- Langage dominant
- Rust
- Étoiles
- 1.1k
- Forks
- 64
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de bytecodealliance/wizer
-
Broken link (2021 WebAssembly Summit)Peut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
bytecodealliance/wizer#130 ·
-
Request for reproducible buildOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
bytecodealliance/wizer#153 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
bytecodealliance/wizer#126 ·
-
Monotonic clock offsettingOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
bytecodealliance/wizer#125 · 1 commentaire ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 32/100
bytecodealliance/wizer#105 · 1 commentaire ·
Toutes les issues de bytecodealliance/wizer
Issues similaires
-
RUSTSEC-2026-0348: Brotli certificate decompression can allocate up to 1 GiB before authenticationOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 60/100
-
Difficulté 1/5 1-3 heures Accessibilité débutants 62/100
-
core: Amount::from_str panics on values above 21M BTC instead of returning an errorPeut-être pris @bhuvan-somisetty l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
crate: spate-s3
Difficulté 2/5 Une demi-journée Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
write_iceberg ignores the table's write.parquet.compression-codec propertyPeut-être pris @YuangGao l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Eventual-Inc/Daft#7606 ·
Les mainteneurs répondent en général sous 1 jour