diff --git a/.github/workflows/rust_tests.yml b/.github/workflows/rust_tests.yml index 67749ab..57c185b 100644 --- a/.github/workflows/rust_tests.yml +++ b/.github/workflows/rust_tests.yml @@ -22,15 +22,18 @@ jobs: - x86_64-unknown-linux-gnu - x86_64-unknown-linux-musl - wasm32-unknown-unknown + - wasm32-wasi steps: - uses: actions/checkout@v2 + # setup wasmedge + - run: curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -p /usr/local # Setup musl if needed - run: sudo apt-get update if: matrix.target == 'x86_64-unknown-linux-musl' - run: sudo apt-get install -y musl musl-dev musl-tools cmake if: matrix.target == 'x86_64-unknown-linux-musl' - + # # Caching stuff - uses: actions/cache@v2 with: @@ -96,7 +99,22 @@ jobs: command: build toolchain: ${{ matrix.toolchain }} args: --target wasm32-unknown-unknown --features reqwest - + - uses: actions-rs/cargo@v1 + name: "Build" + if: matrix.target == 'wasm32-wasi' + with: + command: build + toolchain: ${{ matrix.toolchain }} + args: --target wasm32-wasi --features "http-binding hyper hyper_wasi" + - uses: actions-rs/cargo@v1 + name: "Test" + if: matrix.target == 'wasm32-wasi' + with: + command: test + toolchain: ${{ matrix.toolchain }} + args: --target ${{ matrix.target }} --features "http-binding hyper hyper_wasi" + env: + CARGO_TARGET_WASM32_WASI_RUNNER: wasmedge # Build examples - uses: actions-rs/cargo@v1 name: "Build reqwest-wasm-example" diff --git a/Cargo.toml b/Cargo.toml index c683773..1a89ae8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,6 @@ async-trait = { version = "^0.1.33", optional = true } bytes = { version = "^1.0", optional = true } futures = { version = "^0.3", optional = true } http = { version = "0.2", optional = true } -hyper = { version = "^0.14", optional = true } axum-lib = { version = "^0.6", optional = true, package = "axum" } http-body = { version = "^0.4", optional = true } poem-lib = { version = "=1.2.34", optional = true, package = "poem" }