Add tokio feature & make tokio optional for WASM support (#1382)

* add server feature and make tokio and hyper/server and tcp optional

* address review comments

* don't mention any specific runtimes in the example

* sort deps

* add `tokio` feature when adding `ws`

* don't always pull in tower feature that pulls in tokio io stuff

* remove usage of `tokio_cr`

* changelog

* depend on tokio version that supports wasm

* don't make it sound like tokio doesn't support wasm

* call out new default feature

Co-authored-by: Fisher Darling <[email protected]>
Co-authored-by: David Pedersen <[email protected]>
This commit is contained in:
Logan Keenan
2022-09-25 15:10:33 +00:00
committed by GitHub
co-authored by Fisher Darling David Pedersen
parent 83ba8c3876
commit 31638a2b22
14 changed files with 132 additions and 14 deletions
+20
View File
@@ -209,6 +209,26 @@ jobs:
-p axum-macros
--target armv5te-unknown-linux-musleabi
wasm32-unknown-unknown:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
override: true
profile: minimal
- uses: Swatinem/rust-cache@v1
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: >
--manifest-path ./examples/simple-router-wasm/Cargo.toml
--target wasm32-unknown-unknown
dependencies-are-sorted:
runs-on: ubuntu-latest
strategy: