Amanieu / parking_lot

Compact and efficient synchronization primitives for Rust. Also provides an API for creating custom synchronization primitives.
Apache License 2.0
2.77k stars 217 forks source link

Adjust the `wasm32-unknown-unknown` atomic docs #382

Closed daxpedda closed 1 year ago

daxpedda commented 1 year ago

Currently the documentation on how to target wasm32-unknown-unknown with -C target-feature=+atomics is incorrect and will yield compile errors.

This is because wasm32-unknown-unknown doesn't support unwinding, but -Zbuild-std doesn't support automatic selection of the correct panic strategy, so this has to be set manually with -Zbuild-std=panic_abort,std.

This PR corrects the documentation to reflect this.

See https://github.com/rust-lang/wg-cargo-std-aware/issues/29.

Fixes #267.