Add support for snapshotting tables
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Comienza rastreando las rutas de instrumentación y snapshotting de Wizer descritas en el issue; no se indican archivos ni tests. Determina cómo representar las identidades de funcref entre instancias enlazadas y cómo gestionar las funciones importadas y WASI, preservando el comportamiento de inicialización de externref. La tarea estará terminada cuando ambos tipos de tabla puedan capturarse en snapshots con los casos de module-linking cubiertos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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...
- Lenguaje dominante
- Rust
- Estrellas
- 1.1k
- Forks
- 64
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de bytecodealliance/wizer
-
Broken link (2021 WebAssembly Summit)Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
bytecodealliance/wizer#130 ·
-
Request for reproducible buildAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
bytecodealliance/wizer#153 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
bytecodealliance/wizer#126 ·
-
Monotonic clock offsettingAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
bytecodealliance/wizer#125 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 32/100
bytecodealliance/wizer#105 · 1 comentario ·
Todos los issues de bytecodealliance/wizer
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
storytold/photocraft#5710 ·
Los mantenedores suelen responder en 1 día
-
Two tests fail on a Windows checkout: a CRLF parse in feature_walk_tests, an 8.3 TEMP path in libraries_testsPosiblemente ocupada @CamWight la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
bherbruck/solvecraft#1186 · 1 comentario ·
-
area: screenshot audit bug good first issue priority: P3 security severity: info type: correctness
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pierruno-labs/prowl#31 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
limitlessprojects/Go-Hybrid#50 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día