-
Notifications
You must be signed in to change notification settings - Fork 229
Add a wasm32-wasip3 target #700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -166,6 +166,7 @@ | |
| #include <unistd.h> | ||
| #include <utime.h> | ||
| #include <values.h> | ||
| #include <wasi/__generated_wasip2.h> | ||
| #include <wasi/api.h> | ||
| #include <wasi/libc-busywait.h> | ||
| #include <wasi/libc-environ.h> | ||
|
|
@@ -175,5 +176,6 @@ | |
| #include <wasi/version.h> | ||
| #include <wasi/wasip1.h> | ||
| #include <wasi/wasip2.h> | ||
| #include <wasi/wasip3.h> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My question would be more: Why include
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point! I sort of arbitrarily decided that I ideally want header files to be present on all targets, but the contents will differ per-target. I don't have the strongest of reasons for doing so, but this means that all these headers are present on all targets, but |
||
| #include <wchar.h> | ||
| #include <wctype.h> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
__generated_wasip2.hbut not__generate_wasip3.h?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because there is a
wasm32-wasip3/include-all.cwhich contains__generate_wasip3.h, I guess.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this is due to how
include-all.cworks. The file is generated here during thecheck-symbolsstep and is a#includeof all headers located in the sysroot. The sysroot differs from wasip2 to wasip3 due to this cmake logicThe general idea was that I didn't want to tamper with the auto-generated output of
wit-bindgentoo too much (doing theseds below is already cumbersome enough). I also didn't want header files to be available in a wasip2 sysroot, for example to give access to wasip3 APIs. For example#include <wasi/wasip3.h>expands to nothing onwasm32-wasip2, intentionally so.