"Unsupported ELF header" when running Go-compiled WASM
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
调研方向
从 examples/helloworld/main.rs 开始,使用 GOOS=wasip1 GOARCH=wasm 构建 testhyperlight-go.wasm,然后运行示例以复现失败。将 Go 生成的模块与现有的 HelloWorld.aot 和 RunWasm.aot 用例进行比较,并检查 issue 中提到的 wasm-clang-builder 上下文。完成的标准是已确定是否支持或存在兼容性限制,已识别所需的任何更改,并且示例不再产生 ELF-header 错误。
由索引模型根据 Issue 内容生成。
描述
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?
- 主要语言
- Rust
- 星标
- 728
- 派生
- 39
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 11
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
hyperlight-dev/hyperlight-wasm 的其他 Issue
-
lifecycle/needs review
难度 4/5 3-5 天 新手友好度 35/100
hyperlight-dev/hyperlight-wasm#550 ·
维护者通常 1 天内回复
-
lifecycle/needs review
难度 4/5 3-5 天 新手友好度 55/100
hyperlight-dev/hyperlight-wasm#545 ·
维护者通常 1 天内回复
-
lifecycle/needs review
难度 4/5 3-5 天 新手友好度 38/100
hyperlight-dev/hyperlight-wasm#538 ·
维护者通常 1 天内回复
-
use the #[guest_func] macro on `init_wasm_runtime` instead of manually calling register_function?未关闭lifecycle/needs review
难度 3/5 1-2 天 新手友好度 35/100
hyperlight-dev/hyperlight-wasm#395 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
lifecycle/needs review
难度 2/5 1-3 小时 新手友好度 48/100
hyperlight-dev/hyperlight-wasm#378 ·
维护者通常 1 天内回复
查看 hyperlight-dev/hyperlight-wasm 的全部 Issue
相似的 Issue
-
[Bug]: Web chat input doesn't regain focus after a reply finishes可能已有人在做 @GaijinSystems 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
zeroclaw-labs/zeroclaw#11658 ·
维护者通常 2 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 82/100
bytecodealliance/wasm-tools#2768 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
NuSkooler/enigma-bbs#907 ·
维护者通常 1 天内回复