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-none
target and should enable all features previously behindcfg(feature = "std")
for bothwasm32-unknown-unknown
andwasm32v1-none
. Additionally, nowjs-sys
,web-sys
,wasm-bindgen-futures
andwasm-bindgen-test
supportno_std
.Changes:
any(target_os = "unknown", target_os = "none")
instead oftarget_os = "unknown"
.once_cell::sync::Lazy
when targetingstd
.Send + Sync
wrappedonce_cell::unsync::Lazy
when targetingno_std
withouttarget_feature = "atomics"
.once_cell/critical_section
when targetingno_std
withtarget_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 mut
when targetingno_std
withouttarget_feature = "atomics"
.#[thread_local]
when targetingno_std
withtarget_feature = "atomics"
.std
crate feature tojs-sys
,web-sys
,wasm-bindgen-futures
andwasm-bindgen-test
and enable by default. This makes it possible to use these crates withno_std
for both targets as well.console_error_panic_hook
and ano_std
version ofscoped_tls
.Missing:
wasm32v1-none
to CI. Probably in a follow-up when its stable, ergo Rust v1.84.