Skip to content

Conversation

@alexcrichton
Copy link
Collaborator

As a step towards #688 this adds a new header which ensures that the __wasipN__ variables are defined. These will eventually be provided via llvm/llvm-project#165345 but in the meantime this uses a header to define them.

This then additionally refactors the internals to have wasi/wasip{1,2}.h as well as wasi/api.h which includes the correct header. The previous __wasilibc_use_wasip2 macro is removed entirely in favor of __wasip2__ defined in this header.

As a step towards WebAssembly#688 this adds a new header which ensures that the
`__wasipN__` variables are defined. These will eventually be provided
via llvm/llvm-project#165345 but in the meantime this uses a header to
define them.

This then additionally refactors the internals to have
`wasi/wasip{1,2}.h` as well as `wasi/api.h` which includes the correct
header. The previous `__wasilibc_use_wasip2` macro is removed entirely
in favor of `__wasip2__` defined in this header.
@alexcrichton
Copy link
Collaborator Author

Note that this is split out of #700 to see more about the end goal

@alexcrichton alexcrichton merged commit 3fa18af into WebAssembly:main Jan 6, 2026
25 checks passed
@alexcrichton alexcrichton deleted the wasi-version-h branch January 6, 2026 00:05
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.

2 participants