LLVM support for memory64 progress

Hi, I recently saw that Rust seems to already support wasm64 target, Rust back-end uses LLVM, so I was wondering if clang/LLVM can now compile C source files into a complete, wasm64 modules that comply with the memory64 specification and can actually run on some runtimes such as wasmtime?

I have tried using the following command:

bin/clang–target=wasm64-unknown-wasi-c-ohello.ohello.c

bin/wasm-ld-mwasm64-no-gc-sections-emain–verbosehello.o-ohello.wasm

After converting to wat, you do see some new changes to the wasm64 module, but this wasm module is not executable at run time.

It is possible that some libraries are 32-bit, such as libclang_rt.builtins-wasm32.a, crt1.o, and libc.so, which are not linked by the above command, and the wasm32 module cannot be linked to the wasm64 module.

So is there any way to compile C source files into executable wasm64 modules, are some of the above libraries capable of generating 64-bit equivalents, or am I being too optimistic about LLVM’s implementation of memory64?

2 Likes

@Hellosuna ,
Did you figure this out or got an answer to your question?

I am also very interested in this topic.