wasi-sdk icon indicating copy to clipboard operation
wasi-sdk copied to clipboard

Any plans for wasm64 support?

Open tudor opened this issue 4 years ago • 10 comments

Are there any plans to support 64-bit builds?

It looks to me like wasm64 (also known as "memory64") uses a LP64 model (int is 32 bits, long, long long, and pointers are 64 bits), which is the same as the memory model on 64-bit Unix-y platforms (not Windows, where long is still 32 bits even on x86_64).

tudor avatar Jul 17 '21 03:07 tudor

Yes; the main work right now is happening in upstream LLVM (eg. here).

There will also need to be some amount of work to port wasi-libc. All the code in wasi-libc is written with a wasm64 target in mind. We'll need a 64-bit version of the WASI APIs as well, and the code for that is also all written with a wasm64 target in mind. So in theory this should be a straightforward process.

sunfishcode avatar Jul 19 '21 22:07 sunfishcode

Exciting!

I have a strong vested interest in seeing WASM succeed as a server-side plugin (and write-once, run-anywhere code distribution) platform. There are a few missing pieces:

  • 64-bit support
  • threads
  • sockets
  • stack unwinding / exception handling

but it seems that all 4 areas are seeing a lot of active work, which means 2022 will be an exciting year for WASM.

tudor avatar Jul 19 '21 23:07 tudor

It's been a few years and the clang link seems to have been resolved. Any updates?

TimWhiting avatar Jul 15 '23 15:07 TimWhiting

I don't see anyone working on this too closely at the moment: are you interested in adding support for wasm64-wasi?

abrown avatar Jul 18 '23 01:07 abrown

If it isn't a bunch of work. Are there assumptions being made that make this a big effort, or is it a simple change?

TimWhiting avatar Jul 22 '23 02:07 TimWhiting

I would hope its not too much work. I imagine most things will just work. The biggest change is likely that would we would need to start shipping all of our pre-built libraries in wsam64 variants.

sbc100 avatar Jul 24 '23 09:07 sbc100

I'd be interested in seeing wasi-sdk support wasm64, if everything is ready for it. Seems that the first thing to do would be to make wasi-libc support wasm64 ; should we open an issue there ?

mh4ck-Thales avatar Feb 01 '24 15:02 mh4ck-Thales

There's been some work already on that in https://github.com/WebAssembly/wasi-libc/pull/444 but there are concerns about how that is implemented so I think some discussion is needed. @loganek is also interested in making this happen and has added an agenda item to the WASI subgroup meeting to have that discussion: https://github.com/WebAssembly/meetings/pull/1479. Can you join that?

abrown avatar Feb 01 '24 16:02 abrown

Thanks, I did checked the issues but not the PRs. I just joined the WebAssembly CG and filled the form for the meeting. I'll be there.

mh4ck-Thales avatar Feb 02 '24 10:02 mh4ck-Thales