You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requires #120371 since WASI SDK 22 is required. But this supposedly has some socket support! Downside is any runtime that doesn't support preview2 won't be able to use the file. That probably means adding a flag to wasi.py to control for the target triple as it's currently hard-coded:
I have made a try to support the socket in p2, but I found some issues. For now, the socket support in p2 is not UNIX compatible. It miss many things that are widely used. For example, getaddrinfo is not usable in p2. This means that we need to wrap https://github.com/WebAssembly/wasi-sockets/blob/main/wit/ip-name-lookup.wit as getaddrinfo in socket module. Otherwise, the socket test can't not be passed in p2 environment. I'm not sure this is acceptable or not
FYI I will leave this open while I figure out what to do about WASI 0.2 as it's technically a new platform which means buildbot, PEP 11, deciding what to test in CI, etc.
OK, so I found out that VS Code's WASI support is not moving over to WASI 0.2 yet because it's a lot of work and the thinking is networking isn't useful w/o threads and those haven't fully landed in WASM yet (I hear Chrome/v8 is the holdup). As such, work isn't as concerned w/ WASI 0.2 and since that would mean I would have to support it as a tier 3 on my own time I'm going to de-emphasize WASI 0.2 and instead focus on more generic things like getting e.g., zlib working (my plans are tracked at https://opensource.snarky.ca/Python/WASI).
So I'm closing this issue as done as my changes to wasi.py means one can do their own WASI 0.2 build w/o issue (just w/o special features turned on).
Activity
Zheaoli commentedon Jul 12, 2024
May I make a try for this?
brettcannon commentedon Jul 12, 2024
Are you asking about changing
wasi.py, or trying to makewasm23-wasip2work? If it's the latter then dicej@118e9d8 may be of some help.Zheaoli commentedon Jul 12, 2024
Sorry for confused reply. I would like to make a try to support
wasm32-wasip2Zheaoli commentedon Aug 6, 2024
Hi Brett, Sorry for replying too late.
I have made a try to support the socket in
p2, but I found some issues. For now, the socket support in p2 is not UNIX compatible. It miss many things that are widely used. For example,getaddrinfois not usable in p2. This means that we need to wrap https://github.com/WebAssembly/wasi-sockets/blob/main/wit/ip-name-lookup.wit asgetaddrinfoin socket module. Otherwise, the socket test can't not be passed in p2 environment. I'm not sure this is acceptable or notbrettcannon commentedon Aug 13, 2024
@Zheaoli I think some support is better than nothing. I'm okay getting what's there working and then providing the feedback of what's still missing.
brettcannon commentedon Aug 14, 2024
I've started a branch to at least allow for compiling w/
wasm32-wasip2regardless of whether any networking is turned on.pythonGH-121634: have `wasi.py` accept the host target triple as an a…
GH-121634: have `wasi.py` accept the host target triple as an argument (
pythonGH-121634: have `wasi.py` accept the host target triple as an a…
brettcannon commentedon Aug 15, 2024
FYI I will leave this open while I figure out what to do about WASI 0.2 as it's technically a new platform which means buildbot, PEP 11, deciding what to test in CI, etc.
pythonGH-121634: have `wasi.py` accept the host target triple as an a…
brettcannon commentedon Aug 27, 2024
OK, so I found out that VS Code's WASI support is not moving over to WASI 0.2 yet because it's a lot of work and the thinking is networking isn't useful w/o threads and those haven't fully landed in WASM yet (I hear Chrome/v8 is the holdup). As such, work isn't as concerned w/ WASI 0.2 and since that would mean I would have to support it as a tier 3 on my own time I'm going to de-emphasize WASI 0.2 and instead focus on more generic things like getting e.g.,
zlibworking (my plans are tracked at https://opensource.snarky.ca/Python/WASI).So I'm closing this issue as done as my changes to
wasi.pymeans one can do their own WASI 0.2 build w/o issue (just w/o special features turned on).[3.13] GH-121634: have `wasi.py` accept the host target triple as an …