wagon
wagon copied to clipboard
wasm-run: could not read module: open env.wasm: no such file or directory
I built wasm file using Emscripten. After I got wasm file and run wagon, it shows that
wasm-run: could not read module: open env.wasm: no such file or directory
How to fix it?
Thanks
hi @earth2378,
thanks for the report. could you please give a very simple reproducer? (ie: minimal instructions so we can tackle this?)
thanks a lot.
I'm not sure how this error was generated, but, for what it's worth, I've found that all programs compiled by emscripten require various things to be exported by the "environment". Emscripten generally produces both a wasm module and a js loader file which provides those exports. I've been able to hack wagon to provide things sufficient for simple programs. I'd like to put together a PR for this when I get back from vacation - if there's interest. Unfortunately it is my impression that the "environment" part is not yet well standardized for wasm.
On Wed, Jul 4, 2018, 5:14 PM Sebastien Binet [email protected] wrote:
hi @earth2378 https://github.com/earth2378,
thanks for the report. could you please give a very simple reproducer? (ie: minimal instructions so we can tackle this?)
thanks a lot.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/go-interpreter/wagon/issues/64#issuecomment-402491555, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXBcfnBVocWPj-oP-Vb0dtj3aAqp_mEks5uDM3DgaJpZM4VCZrn .
@andreimatei definitely an interest :) (enjoy your holidays!)
same problem here, any sort of hello world that I might compile, ends up with wast/wasm that calls (import "env" ... ) or (import "stdlib" ...) and wasm-run dies with could not find stdlib.wasm, etc. I'm not sure how to provide these libraries to wasm-run.
@donpdonp and did you get a solution?
Can anyone provide an ongoing solution?
@guo-li-hua some simply code can work while specify high level opt flag while generate,but if you use something like memory op etc,still error. i recommans to use rust ,very compatible for wasm running