Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*: Drop generic wasm32-unknown-unknown support (#2038)
With `rand` `v0.8.0` platform support changed [1] due to its upgrade to `getrandom` `v0.2`. With `getrandom` `v0.2` `wasm32-unknown-unknown` is no longer supported out of the box: > This crate fully supports the wasm32-wasi and wasm32-unknown-emscripten > targets. However, the wasm32-unknown-unknown target is not automatically > supported since, from the target name alone, we cannot deduce which JavaScript > interface is in use (or if JavaScript is available at all). > > Instead, if the "js" Cargo feature is enabled, this crate will assume that you > are building for an environment containing JavaScript, and will call the > appropriate methods. Both web browser (main window and Web Workers) and > Node.js environments are supported, invoking the methods described above using > the wasm-bindgen toolchain. > > This feature has no effect on targets other than wasm32-unknown-unknown. This commit drops support for wasm32-unknown-unknown in favor of the two more specific targets wasm32-wasi and wasm32-unknown-emscripten. Note on `resolver = "2"`: The new resolver is required to prevent features being mixed, more specifically to prevent libp2p-noise to build with the `ring-resolver` feature. See [3] for details. --- [1] https://github.com/rust-random/rand/blob/master/CHANGELOG.md#platform-support [2] https://docs.rs/getrandom/0.2.2/getrandom/#webassembly-support [3] https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2
- Loading branch information