`generate` and `dev` emit an unloadable module with wasm-opt 132
Los mantenedores suelen responder en 1 día
@coolreader18 ya está trabajando en esto.
Desde el 27/8/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Summary
wasm-opt 132 added the compact import section encoding and turns it on under -all.
spacetime build runs wasm-opt -all -g -O2, so the optimised module now uses that encoding and
spacetimedb can no longer parse it. Disabling the feature fixes it.
Repro
$ wasm-opt --version
wasm-opt version 132
$ spacetime --version
spacetimedb tool version 2.8.2; spacetimedb-lib version 2.8.2;
$ spacetime init compact-repro -t basic-rs --non-interactive --local
$ cd compact-repro
$ spacetime dev compact-repro --server-only -y
Compiling compact_repro v0.1.0 (.../compact-repro/spacetimedb)
Finished `release` profile [optimized] target(s) in 14.40s
Optimising module with wasm-opt...
Build complete!
Publishing...
Publishing module .../compact-repro/spacetimedb to database 'compact-repro'
Optimising module with wasm-opt...
Build finished successfully.
Uploading to http://127.0.0.1:3000 => http://127.0.0.1:3000
Checking for breaking changes...
Publishing module...
Error: failed to parse WebAssembly module: invalid leading byte (0x7e) for external kind (at offset 0xb4)
Caused by:
HTTP status server error (500 Internal Server Error) for url (http://127.0.0.1:3000/v1/database/compact-repro?host_type=Wasm)
spacetime generate fails the same way, and needs no server at all:
$ spacetime generate --lang rust --out-dir src/module_bindings --module-path spacetimedb
Generating Rust module bindings for module spacetimedb
Optimising module with wasm-opt...
Build finished successfully.
Error: failed to parse WebAssembly module
Caused by:
invalid leading byte (0x7e) for external kind (at offset 0xb4)
Error: could not extract schema
Caused by:
EOF while parsing a value at line 1 column 0
The reported byte and offset vary by module. Both 0x7e and 0x7f occur, depending on whether a
group of imports shares just its module name or its type as well.
Cause
crates/cli/src/tasks/mod.rs:
match cmd!("wasm-opt", "-all", "-g", "-O2", &wasm_path, "-o", &wasm_path_opt).run() {
-all turns on every Binaryen feature, which as of version 132 includes compact-imports. The
re-encoded import section then fails to parse in wasmtime 39 (wasmparser 0.240), which is what
loads the module in both cases above: generate via spacetimedb-standalone extract-schema, and
publish via the server's publish route.
Suggested fix
Either add --disable-compact-imports after -all if version 132 is detected, or remove -all and specify the needed features.
- Lenguaje dominante
- Rust
- Estrellas
- 25.2k
- Forks
- 1.1k
- Merge medio
- 3 d 17 h
- PR fusionados (30 d)
- 45
Preparar el entorno
Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 clockworklabs/SpacetimeDB
-
CI flake: LintsAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
clockworklabs/SpacetimeDB#5985 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
clockworklabs/SpacetimeDB#5943 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
clockworklabs/SpacetimeDB#5851 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
clockworklabs/SpacetimeDB#5693 ·
Los mantenedores suelen responder en 1 día
-
Railway Deployment Config IssuesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
clockworklabs/SpacetimeDB#5587 ·
Los mantenedores suelen responder en 1 día
Todos los issues de clockworklabs/SpacetimeDB
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
arkworks-rs/algebra#1161 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
lbjlaq/Antigravity-Manager#3525 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Registry Scheduling: startup logging goes to stdout, colliding with a stdout audit destinationAbiertoagent-ready area:platform bug criticality:p3 rust triage:needs-implementation
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
registrystack/registry-stack#1583 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Docs: "Work with Codex from anywhere" page still claims Windows mobile support is "coming soon"Abiertoapp documentation remote windows-os
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día