"Unsupported ELF header" when running Go-compiled WASM
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- backend, operating-systems
Direzione di ricerca
Inizia da examples/helloworld/main.rs e riproduci il problema compilando testhyperlight-go.wasm con GOOS=wasip1 GOARCH=wasm, quindi eseguendo l’esempio. Confronta il modulo generato da Go con i casi esistenti HelloWorld.aot e RunWasm.aot, e analizza il contesto wasm-clang-builder menzionato nell’issue. Il lavoro è completato quando è stato stabilito il supporto o il limite di compatibilità, sono state identificate tutte le modifiche necessarie e l’esempio non produce più l’errore ELF-header.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Issue Description
I am trying to run a Go-compiled WASM module (testhyperlight-go.wasm) with hyperlight-wasm, but encounter the following error:
Error: GuestError(GuestError, "Error: failed to parse precompiled artifact as an ELF\n\nCaused by:\n Unsupported ELF header")
This occurs when attempting to load the WASM file in the modified examples/helloworld/main.rs test case (see Reproduction Steps below).
Reproduction Steps
-
Compile the Go WASM module:
bash GOOS=wasip1 GOARCH=wasm go build -o "testhyperlight-go.wasm"package main //go:wasmexport noReturnCal func noReturnCal() { result := 0 for i := 0; i < 100; i++ { result += i } } func main() {} -
Modify
examples/helloworld/main.rsto include the new test case:fn main() -> Result<()> { let tests = [ ( "HelloWorld.aot", "HelloWorld", "Message from Rust Example to Wasm Function".to_string(), ), ( "RunWasm.aot", "Echo", "Message from Rust Example to Wasm Function".to_string(), ), // New test case (Go WASM) ( "testhyperlight-go.wasm", "noReturnCal", "Message from Rust Example to Wasm Function".to_string(), ), ]; // ... (rest of the test logic) } -
Run the example and observe the error:
Result from calling HelloWorld Function in Wasm Module test case 0) is: 0 Result from calling Echo Function in Wasm Module test case 1) is: Message from Rust Example to Wasm Function Error: GuestError(GuestError, "Error: failed to parse precompiled artifact as an ELF\n\nCaused by:\n Unsupported ELF header")
Questions
- Does hyperlight-wasm currently support WASM files compiled with another compiler?
- Hyperlight provide
wasm-clang-builderto compile C file , but does hyperlight compatible with Go-compiled WASM (with WASI support, such as GOOS=wasip1 GOARCH=wasm go build).
- Hyperlight provide
- If not, are there any possible modifications that can make hyperlight-wasm work with Go-compiled WASM?
- 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
-
Replayed reasoning items send "content": null, which the Responses API schema does not permit Apertabug CLI custom-model
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
A-allocators A-docs C-enhancement T-libs
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100