-
Notifications
You must be signed in to change notification settings - Fork 467
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
Fix invalid wasi targets compatibility #1105
Conversation
const TARGETS: [&'static str; 5] = [ | ||
"wasm32-wasi", | ||
"wasm32-wasip1", | ||
"wasm32-wasip1-threads", | ||
"wasm32-wasip2", | ||
"wasm32-wasi-threads", | ||
]; | ||
return TARGETS.contains(&target); |
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 are we listing each target? Would target.contains("wasi")
not be more forwards-compatible?
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.
Maybe, it was mostly to ensure if they had a target supporting exceptions or something like that to handle them separately, but maybe its overkill
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.
Thank you!
BTW, cc @antaalt it'd be great if we can have some testing for wasi targets!
Yes, I will look into it |
Thanks for your help following Fix WASI compilation for C++, I have tested it on my side from main and spotted some issues with incompatible targets, took some time to clean this aswell and ensure every targets are clearly defined to avoid potential issues with no-exceptions flags