diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ad249b82a9..04ada7233c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,11 +56,18 @@ jobs: - uses: actions/checkout@v2 - - name: Install Rust + - name: Install Rust wasm32-unknown-emscripten uses: actions-rs/toolchain@v1 with: toolchain: stable - target: wasm32-unknown-unknown + target: wasm32-unknown-emscripten + override: true + + - name: Install Rust wasm32-wasi + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-wasi override: true - name: Install a recent version of clang @@ -85,10 +92,15 @@ jobs: path: target key: wasm-cargo-build-target-${{ hashFiles('Cargo.toml') }} - - name: Build on WASM + - name: Build on wasm32-unknown-emscripten + # TODO: also run `cargo test` + # TODO: ideally we would build `--workspace`, but not all crates compile for WASM + run: cargo build --target=wasm32-unknown-emscripten + + - name: Build on wasm32-wasi # TODO: also run `cargo test` # TODO: ideally we would build `--workspace`, but not all crates compile for WASM - run: cargo build --target=wasm32-unknown-unknown + run: cargo build --target=wasm32-wasi check-rustdoc-links: name: Check rustdoc intra-doc links diff --git a/CHANGELOG.md b/CHANGELOG.md index c164b5f0848..3cc3cae18c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,10 @@ - `libp2p-request-response` - `libp2p-swarm` - `libp2p-wasm-ext` + +- Drop support for `wasm32-unknown-unknown` in favor of + `wasm32-unknown-emscripten` and `wasm32-wasi` [PR + 2038](https://github.com/libp2p/rust-libp2p/pull/2038). ## Version 0.36.0 [2021-03-17] diff --git a/Cargo.toml b/Cargo.toml index 61e768f2a51..35d13bceea8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -100,6 +100,7 @@ env_logger = "0.8.1" tokio = { version = "1.0.1", features = ["io-util", "io-std", "macros", "rt", "rt-multi-thread"] } [workspace] +resolver = "2" members = [ "core", "misc/multiaddr",