bytecodealliance / bytecodealliance/cargo-component
Versions of wit-bindgen don't match
- Lingua principale
- Rust
- Stelle
- 593
- Fork
- 68
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
The version in the project and the version the binding create are off:
```
cargo component --version
cargo-component-component 0.15.0
cargo component new --lib test-version
cd test-version
cat Cargo.toml
[package]
name = "test-version"
version = "0.1.0"
edition = "2021"
[dependencies]
wit-bindgen-rt = { version = "0.29.0", features = ["bitflags"] }
[lib]
crate-type = ["cdylib"]
[profile.release]
codegen-units = 1
opt-level = "s"
debug = false
strip = true
lto = true
[package.metadata.component]
package = "component:test-version"
[package.metadata.component.dependencies]
```
```
cargo component build
head src/bindings.rs
// Generated by `wit-bindgen` 0.25.0. DO NOT EDIT!
// Options used:
#[doc(hidden)]
#[allow(non_snake_case)]
pub unsafe fn _export_hello_world_cabi() -> *mut u8 {
#[cfg(target_arch = "wasm32")]
_rt::run_ctors_once();
let result0 = T::hello_world();
let ptr1 = _RET_AREA.0.as_mut_ptr().cast::();
let vec2 = (result0.into_bytes()).into_boxed_slice();
```
Notice the versions are not the same (`wit-bindgen-rt = { version = "0.29.0",` and `// Generated by `wit-bindgen` 0.25.0. DO NOT EDIT!`
This doesn't seem to cause a problem with current versions, but I think it could?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Riproduci la discrepanza con `cargo component --version`, `cargo component new --lib` e `cargo component build`. Confronta la dipendenza generata in `Cargo.toml` con il commento sulla versione in `src/bindings.rs`, quindi traccia il percorso di generazione per determinare perché differiscono. Il lavoro è completato quando il progetto generato riporta versioni coerenti di wit-bindgen senza interrompere la build.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust, wasm
- Ambito
- build-system, tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100