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

chore: use target_family wasm instead of wasm32 #4864

Merged
merged 3 commits into from Jul 26, 2022

Conversation

Darksonn
Copy link
Contributor

According to this comment, this is the correct way to check for wasm.

@Darksonn Darksonn added the A-tokio Area: The main tokio crate label Jul 25, 2022
@Darksonn Darksonn mentioned this pull request Jul 25, 2022
6 tasks
@github-actions github-actions bot added the R-loom Run loom tests on this PR label Jul 25, 2022
@Darksonn Darksonn added the T-wasm Topic: Web Assembly label Jul 25, 2022
@Darksonn Darksonn force-pushed the alice/remove-32-from-wasm-target branch from f3bedc6 to fe8aefa Compare July 26, 2022 07:20
@Darksonn Darksonn enabled auto-merge (squash) July 26, 2022 07:21
@Darksonn Darksonn merged commit 0dc62da into master Jul 26, 2022
@Darksonn Darksonn deleted the alice/remove-32-from-wasm-target branch July 26, 2022 07:47
@taiki-e
Copy link
Member

taiki-e commented Jul 26, 2022

As a side note, target_family = "wasm" requires Rust 1.54 (rust-lang/rust#84072). That said, this is a tier 2 target supported under unstable tokio_unstable cfg, so I believe requiring a slightly higher version than MSRV should not be a problem.

@Darksonn
Copy link
Contributor Author

Ah, that's unfortunate. Some modules such as tokio::sync are already stable under wasm, so this is an issue.

@taiki-e
Copy link
Member

taiki-e commented Jul 26, 2022

Some modules such as tokio::sync are already stable under wasm, so this is an issue.

Oh, I missed it. Looks like we need to replace target_family = "wasm" with any(target_arch = "wasm32", target_arch = "wasm64").

Darksonn added a commit that referenced this pull request Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate R-loom Run loom tests on this PR T-wasm Topic: Web Assembly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants