"Unsupported ELF header" when running Go-compiled WASM
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- backend, operating-systems
Hướng nghiên cứu
Bắt đầu với examples/helloworld/main.rs và tái hiện lỗi bằng cách build testhyperlight-go.wasm với GOOS=wasip1 GOARCH=wasm, sau đó chạy example. So sánh module do Go tạo ra với các trường hợp HelloWorld.aot và RunWasm.aot hiện có, đồng thời kiểm tra ngữ cảnh wasm-clang-builder được đề cập trong issue. Được xem là hoàn tất khi đã xác định được việc hỗ trợ hoặc giới hạn tương thích, xác định mọi thay đổi cần thiết và example không còn tạo ra lỗi ELF-header.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- Rust
- Star
- 728
- Fork
- 39
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hyperlight-dev/hyperlight-wasm
-
lifecycle/needs review
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
hyperlight-dev/hyperlight-wasm#550 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
lifecycle/needs review
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
hyperlight-dev/hyperlight-wasm#545 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Can't update to wasmtime 48Đang mởlifecycle/needs review
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
hyperlight-dev/hyperlight-wasm#538 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
use the #[guest_func] macro on `init_wasm_runtime` instead of manually calling register_function?Đang mởlifecycle/needs review
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
hyperlight-dev/hyperlight-wasm#395 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
lifecycle/needs review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
hyperlight-dev/hyperlight-wasm#378 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của hyperlight-dev/hyperlight-wasm
Issue tương tự
-
[Bug] Completion info popup (.cm-completionInfo) ignores the configured editor fontCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug user-priority/P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
t8y2/dbx#11718 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
rescript-lang/rescript#8765 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nautechsystems/nautilus_trader#5287 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
farion1231/cc-switch#8072 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Python 3.15 supportCó thể đã có người làm @amnesiaof đã nhận hôm nay. Đang mởL: python L: python:uv
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dependabot/dependabot-core#16524 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày