Interface with an overlapping name used internally will cause build error
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- rust, wasm
- Ambito
- build-system
Direzione di ricerca
Riprodurre la build con l’esempio WIT e ispezionare src/hyperlight_wasm_macro/src/wasmguest.rs intorno alla riga 90, quindi seguire l’uso generato da src/component.rs. Confermare come il nome dell’interfaccia sovrapposto modifichi le chiamate generate e verificare che l’esempio venga compilato senza gli errori segnalati E0107 e E0061.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
If you have a wit file with:
package wasi-sample:example;
world example {
import host;
export adder;
}
interface adder {
add: func(left: u32, right: u32) -> u32;
call-host-function: func(input: string);
}
interface host {
host-function: func(input: string) -> string;
}
you will end up with errors
Compiling hyperlight-wasm v0.1.0 (/home/jstur/projects/hyperlight-wasm/src/hyperlight_wasm)
error: failed to run custom build command for `hyperlight-wasm v0.1.0 (/home/jstur/projects/hyperlight-wasm/src/hyperlight_wasm)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: `/home/jstur/projects/hyperlight-wasm/target/debug/build/hyperlight-wasm-f9324c725c3b4d6a/build-script-build` (exit status: 101)
--- stdout
cargo::rerun-if-changed=/home/jstur/projects/hyperlight-wasm/src/wasm_runtime
cargo::rerun-if-env-changed=WIT_WORLD
....
warning: unused import: `hyperlight_guest_bin::host_comm::call_host_function`
--> src/component.rs:31:5
|
31 | use hyperlight_guest_bin::host_comm::call_host_function;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
--> src/component.rs:41:1
|
41 | hyperlight_wasm_macro::wasm_guest_bindgen!();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 0 generic arguments
|
note: function defined here, with 0 generic parameters
--> src/component.rs:41:1
|
41 | hyperlight_wasm_macro::wasm_guest_bindgen!();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `hyperlight_wasm_macro::wasm_guest_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0061]: this function takes 1 argument but 3 arguments were supplied
--> src/component.rs:41:1
|
41 | hyperlight_wasm_macro::wasm_guest_bindgen!();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| expected `&FunctionCall`, found `&str`
| unexpected argument #2 of type `core::option::Option<Vec<ParameterValue>>`
| unexpected argument #3 of type `ReturnType`
|
= note: expected reference `&FunctionCall`
found reference `&'static str`
note: function defined here
--> src/component.rs:41:1
|
41 | hyperlight_wasm_macro::wasm_guest_bindgen!();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `hyperlight_wasm_macro::wasm_guest_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
looks like this might be caused because the relative call here:
- Lingua principale
- Rust
- Stelle
- 728
- Fork
- 39
- Merge medio
- 2g 3h
- PR unite (30g)
- 25
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hyperlight-dev/hyperlight-wasm
-
lifecycle/needs review
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
lifecycle/needs review
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
Can't update to wasmtime 48 Apertalifecycle/needs review
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
-
use the #[guest_func] macro on `init_wasm_runtime` instead of manually calling register_function? Apertalifecycle/needs review
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
hyperlight-dev/hyperlight-wasm#395 · 1 commento · 1 reazione ·
-
lifecycle/needs review
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
Tutte le issue di hyperlight-dev/hyperlight-wasm
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
state:needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
zed-industries/zed#64680 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
RustPython/RustPython#8802 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TheLarkInn/aipm#2390 ·