Added support for the wasm32v1-none target #4277
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
This PR adds support for the
wasm32v1-nonetarget and should enable all features previously behindcfg(feature = "std")for bothwasm32-unknown-unknownandwasm32v1-none. Additionally, nowjs-sys,web-sys,wasm-bindgen-futuresandwasm-bindgen-testsupportno_std.Changes:
any(target_os = "unknown", target_os = "none")instead oftarget_os = "unknown".once_cell::sync::Lazywhen targetingstd.Send + Syncwrappedonce_cell::unsync::Lazywhen targetingno_stdwithouttarget_feature = "atomics".once_cell/critical_sectionwhen targetingno_stdwithtarget_feature = "atomics". As recommended bycritical_section, this is something the user has to enable. Notable this only affectslink_to!, any other feature will work as expected with no additional work required from the user.std::thread_local!when targetingstd.static mutwhen targetingno_stdwithouttarget_feature = "atomics".#[thread_local]when targetingno_stdwithtarget_feature = "atomics".stdcrate feature tojs-sys,web-sys,wasm-bindgen-futuresandwasm-bindgen-testand enable by default. This makes it possible to use these crates withno_stdfor both targets as well.console_error_panic_hookand ano_stdversion ofscoped_tls.Missing:
wasm32v1-noneto CI. Probably in a follow-up when its stable, ergo Rust v1.84.