Stream: git-wasmtime

Topic: wasmtime / issue #7795 How to build a wasmtime binary tha...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2024 at 07:46):

BenSunWhiteBoard opened issue #7795:

Hi, I download the release binary, seems it doesn't enable memory64 by default, my running result:

./wasmtime test.wasm
Error: failed to parse WebAssembly module

Caused by:
        Invalid input WebAssembly code at offset 440: memory64 must be enabled for 64-bit memories

I really appreciate it if someone could help me with how to build a wasmtime that could run memory64 wasm file. And if I enable memory64, can I still run memory32 wasm file?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2024 at 07:46):

BenSunWhiteBoard edited issue #7795:

Hi, I download the release binary, seems it doesn't enable memory64 by default, my running result:

./wasmtime test.wasm
Error: failed to parse WebAssembly module

Caused by:
        Invalid input WebAssembly code at offset 440: memory64 must be enabled for 64-bit memories

I really appreciate it if someone could help me with how to build a wasmtime that could run memory64 wasm file. And if I enable memory64, can I still run memory32 wasm file?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2024 at 11:19):

bjorn3 commented on issue #7795:

Try wasmtime -W memory64=y test.wasm.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2024 at 15:39):

alexcrichton commented on issue #7795:

Yes memory64 support is not a compile-time feature but a runtime feature, so @bjorn3's suggestion should work, but I'll hold off on closing this until @BenSunWhiteBoard you confirm it works for you

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2024 at 07:36):

BenSunWhiteBoard commented on issue #7795:

Thanks! I tried it with some handwritten wasm samples, and it did work.
One more question though: If wasi-libc support wasm64 after https://github.com/WebAssembly/wasi-libc/pull/444 got merged, there will be new import WASI APIs like fd_close_wasm64. If I understand correctly, it wouldn't be too much work to add a new interface for it from the implementation of fd_close right? I think it's safe to say that at least a large potion of code can be reused. Does wasmtime plan to support those interface in the near future if wasm64 got supported in wasi-libc and wasi-sdk?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 23 2024 at 18:10):

alexcrichton commented on issue #7795:

memory64 support for wasm is not specified at this time and it's not clear to me that there's an "obvious" design of how to implement it. That PR is one option but isn't necessarily the only one. In that sense it's hard to say what a memory64 wasi would take effort-wise because to me it's not clear to me what the work will be

view this post on Zulip Wasmtime GitHub notifications bot (Jan 25 2024 at 01:28):

BenSunWhiteBoard closed issue #7795:

Hi, I download the release binary, seems it doesn't enable memory64 by default, my running result:

./wasmtime test.wasm
Error: failed to parse WebAssembly module

Caused by:
        Invalid input WebAssembly code at offset 440: memory64 must be enabled for 64-bit memories

I really appreciate it if someone could help me with how to build a wasmtime that could run memory64 wasm file. And if I enable memory64, can I still run memory32 wasm file?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 25 2024 at 01:28):

BenSunWhiteBoard commented on issue #7795:

Thanks for your kind reply! I have no further questions


Last updated: Oct 23 2024 at 20:03 UTC