go-wasm icon indicating copy to clipboard operation
go-wasm copied to clipboard

Parsing a hello-world wasm causes an error

Open hajimehoshi opened this issue 5 years ago • 3 comments

I prepared this Go file

package main

func main() {
        println("Hello, World!")
}

and compiled it as Wasm (GOOS=js GOARCH=wasm go build -o helloworld.wasm main.go). I found the error when passing this wasm file to Parse.

[0x1321e3] parse section: entry 16715: read data section offset initializer: EOF

My Go version is 1.14.

Thanks!

hajimehoshi avatar Feb 26 '20 15:02 hajimehoshi

I think EOF is an expected error and the read date should exist at the same time.

hajimehoshi avatar Feb 26 '20 15:02 hajimehoshi

The author seems to have abandoned it. I checked out the code and its pretty nicely written. The implementation is a bit outdated since this package hasn't been updated in three years hence the errors. I know you're working on a go2cpp project and this would help in the long run if maintained.

People just need to know about it and we'll have a community to maintain it. A Wasm parser is nice package to have anyways.

hx-khan avatar Jan 30 '21 05:01 hx-khan

@hajimehoshi you might want to try https://github.com/akupila/go-wasm/pull/4.

aykevl avatar Oct 30 '21 15:10 aykevl