"Unsupported ELF header" when running Go-compiled WASM
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Área
- backend, operating-systems
Línea de trabajo
Comienza con examples/helloworld/main.rs y reproduce el fallo compilando testhyperlight-go.wasm con GOOS=wasip1 GOARCH=wasm y ejecutando después el ejemplo. Compara el módulo generado por Go con los casos existentes HelloWorld.aot y RunWasm.aot, e inspecciona el contexto de wasm-clang-builder mencionado en el issue. Se considera terminado cuando se haya establecido la compatibilidad o la limitación de compatibilidad, se hayan identificado los cambios necesarios y el ejemplo ya no produzca el error de ELF-header.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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?
- Lenguaje dominante
- Rust
- Estrellas
- 728
- Forks
- 39
- Merge medio
- 1 d 4 h
- PR fusionados (30 d)
- 11
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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 hyperlight-dev/hyperlight-wasm
-
lifecycle/needs review
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
hyperlight-dev/hyperlight-wasm#550 ·
Los mantenedores suelen responder en 1 día
-
lifecycle/needs review
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
hyperlight-dev/hyperlight-wasm#545 ·
Los mantenedores suelen responder en 1 día
-
Can't update to wasmtime 48Abiertolifecycle/needs review
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
hyperlight-dev/hyperlight-wasm#538 ·
Los mantenedores suelen responder en 1 día
-
use the #[guest_func] macro on `init_wasm_runtime` instead of manually calling register_function?Abiertolifecycle/needs review
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
hyperlight-dev/hyperlight-wasm#395 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
lifecycle/needs review
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
hyperlight-dev/hyperlight-wasm#378 ·
Los mantenedores suelen responder en 1 día
Todos los issues de hyperlight-dev/hyperlight-wasm
Issues similares
-
awaiting-response bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
wildcard/caro#1562 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
objectionary/sodg.rs#301 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
HakanSeven12/OpenCADStudio#1706 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug] Completion info popup (.cm-completionInfo) ignores the configured editor fontPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug user-priority/P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
t8y2/dbx#11718 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
rescript-lang/rescript#8765 ·
Los mantenedores suelen responder en 1 día