Skip to content

Test the wasm32-wasip2 target triple #121634

Closed

Description

@brettcannon

https://bytecodealliance.zulipchat.com/#narrow/stream/394175-SIG-Guest-Languages/topic/Python.20subgroup/near/450807393

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:

HOST_TRIPLE = "wasm32-wasi"

Linked PRs

Activity

  1. Zheaoli commented on Jul 12, 2024

    @Zheaoli
    Contributor

    May I make a try for this?

  2. brettcannon commented on Jul 12, 2024

    @brettcannon
    MemberAuthor

    May I make a try for this?

    Are you asking about changing wasi.py, or trying to make wasm23-wasip2 work? If it's the latter then dicej@118e9d8 may be of some help.

  3. Zheaoli commented on Jul 12, 2024

    @Zheaoli
    Contributor

    Sorry for confused reply. I would like to make a try to support wasm32-wasip2

  4. Zheaoli commented on Aug 6, 2024

    @Zheaoli
    Contributor

    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, 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

  5. brettcannon commented on Aug 13, 2024

    @brettcannon
    MemberAuthor

    @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.

  6. brettcannon commented on Aug 14, 2024

    @brettcannon
    MemberAuthor

    I've started a branch to at least allow for compiling w/ wasm32-wasip2 regardless of whether any networking is turned on.

  7. added 2 commits that reference this issue on Aug 15, 2024
  8. added a commit that references this issue on Aug 15, 2024
  9. self-assigned this
    on Aug 15, 2024
  10. brettcannon commented on Aug 15, 2024

    @brettcannon
    MemberAuthor

    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.

  11. added a commit that references this issue on Aug 22, 2024
  12. brettcannon commented on Aug 27, 2024

    @brettcannon
    MemberAuthor

    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).

  13. added a commit that references this issue on Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

OS-wasibuildThe build process and cross-build

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions