bytecodealliance / bytecodealliance/cargo-component
Building with `--release` fails to generate one component type section
- Lingua principale
- Rust
- Stelle
- 593
- Fork
- 68
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I've got [this small repro](https://github.com/bnjbvr/repro-cargo-component-release-failure), in which if I compile with `cargo-component build`, the component is created and can be loaded in wasmtime; but if I do `cargo-component build --release`, then it fails, saying that an imported interface doesn't exist. Inspecting the produced release wasm module with `wasm-tools objdump` shows there's no `log-world` component type section, while there is one such section in the non-release build.
edit: for some reason, in the original repro I do have other libraries which follow the same pattern (it's the library that's importing a component interface), and it works for all of them. Maybe a coincidence, but it's only the logging library that doesn't work somehow.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia con la riproduzione minima collegata e confronta `cargo-component build` con `cargo-component build --release`. Usa `wasm-tools objdump` su entrambi i moduli prodotti per esaminare le sezioni dei tipi dei componenti, in particolare `log-world`; il lavoro è completato quando la build release contiene la sezione richiesta e viene caricata correttamente in wasmtime.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust, wasm
- Ambito
- build-system, compilers
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100