-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't run Golang with large binary #994
Comments
This means that the Clif backend is actually taking a lot of time compiling. I think things should be faster if you run with the singlepass backend: As a way to solve this generically, perhaps we can make singlepass the default backend when the provided binary file is larger than |
@syrusakbary Thanks for help, with
I don't know if it's related to |
Can you post here the wasm file? (you can compress it in a zip and send it in a comment). I'd like to debug a bit further |
main.wasm.zip |
Why are you closing the issue? The problem doesn't seem to be solved yet :-). |
@Hywan Oh, sorry, I thought nobody cares about it. |
@lucklove we debugged it further and it seem to be a bug on the go/wasi WebAssembly file. The file generated is have an invalid data segment length. It should be an easy fix, but it should be done in the https://github.com/neelance/go/tree/wasi repo Pinging @neelance, to see if he can help a bit on that! |
I believe this issue is already fixed on Go master. I need to rebase my branch. Will do so later. |
I cherry-pick these commits and it works now:
|
That's awesome @lucklove. We just tested tidb on wasmer locally and it works great. It seems there is an error on WebAssembly.sh that we are trying to debug now, once it's solved... you will be able to run tidb on the online WebAssembly browser shell as well! |
Closing the issue as this appears to be an issue solved in the go/wasi repo. We also have the PR #1004 that will use automatically the |
I've now rebased my fork for wasi at https://github.com/neelance/go/tree/wasi. |
Describe the bug
wasmer hang when run large .wasm file compiled from Golang
wasmer 0.9.0 | | x86_64
Steps to reproduce
main.go:
With go/wasi implementation, compile with
GOOS=wasi GOARCH=wasm go build -o main.wasm
Run with
wasmer run main.wasm
When the xs is small, it's ok, but it take longer time when xs grows. And when the main.wasm is large (abount 50MB), the wamser will hang
Expected behavior
Actual behavior
Additional context
The text was updated successfully, but these errors were encountered: