Skip to content
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

Merged
merged 2 commits into from
Jun 29, 2024

Conversation

antaalt
Copy link
Contributor

@antaalt antaalt commented Jun 24, 2024

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

Comment on lines +3925 to +3932
const TARGETS: [&'static str; 5] = [
"wasm32-wasi",
"wasm32-wasip1",
"wasm32-wasip1-threads",
"wasm32-wasip2",
"wasm32-wasi-threads",
];
return TARGETS.contains(&target);
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

@NobodyXu NobodyXu left a 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!

src/lib.rs Show resolved Hide resolved
@NobodyXu NobodyXu merged commit 9d44677 into rust-lang:main Jun 29, 2024
24 checks passed
@antaalt
Copy link
Contributor Author

antaalt commented Jun 29, 2024

Thank you!

BTW, cc @antaalt it'd be great if we can have some testing for wasi targets!

Yes, I will look into it

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.

3 participants