Skip to content

Handle wasip3 task-specific information differently - #1752

Open
alexcrichton wants to merge 1 commit into
bytecodealliance:mainfrom
alexcrichton:handle-tls-differently
Open

alexcrichton wants to merge 1 commit into
bytecodealliance:mainfrom
alexcrichton:handle-tls-differently

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

This commit is the dual of WebAssembly/wasi-libc#884 to handle the changes happening there. Specifically on wasip3 using TLS is going to stop working in wasi-sdk once that wasi-libc PR lands. The rationale for this is that TLS wants to be the same across all component model tasks, not unique per-task. This change detects whether wasi-sdk-35 or later is in use and invokes the wasi-libc-defined API in that situation. This means that wit-bindgen will continue to work as-is with wasi-sdk-34 and after this commit it'll additionally be compatible with wasi-sdk-35 as well. Eventually in the future wasi-sdk-35 can be unconditionally required at which point the C shims here can go away entirely.

This commit is the dual of WebAssembly/wasi-libc#884 to handle the
changes happening there. Specifically on wasip3 using TLS is going to
stop working in wasi-sdk once that wasi-libc PR lands. The rationale for
this is that TLS wants to be the same across all component model tasks,
not unique per-task. This change detects whether wasi-sdk-35 or later is
in use and invokes the wasi-libc-defined API in that situation. This
means that wit-bindgen will continue to work as-is with wasi-sdk-34 and
after this commit it'll additionally be compatible with wasi-sdk-35 as
well. Eventually in the future wasi-sdk-35 can be unconditionally
required at which point the C shims here can go away entirely.
@alexcrichton
alexcrichton requested a review from dicej October 15, 2026 21:53

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant