http-rs / http-rs/surf

in v2.3.2 with wasm-client, it could not compile; error[E0432]: unresolved import `http_client::isahc`

Open
#345 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.5k
Forks
128
PR merge metrics
No merged PRs in 30d

Description

## Repro

1. `cargo new surf-wasm-test --lib`
2. edit "Cargo.toml"
- `crate-type = [ "cdylib" ]` in `[lib]`
- `surf = { version = "2.3.2", fefault-features = false, features = [ "wasm-client" ] }` in `[dependencies]`
3. `cargo check --target wasm32-unknown-unknown`, and then it occur the error.

## Error

```
Checking surf v2.3.2
error[E0432]: unresolved import `http_client::isahc`
--> /home/usagi/.cargo/registry/src/github.com-1ecc6299db9ec823/surf-2.3.2/src/client.rs:13:26
|
13 | use http_client::isahc::IsahcClient as DefaultClient;
| ^^^^^ could not find `isahc` in `http_client`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `surf` due to previous error
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the Cargo.toml settings from the report and run cargo check --target wasm32-unknown-unknown. Inspect surf-2.3.2/src/client.rs and the wasm-client feature configuration around the unresolved http_client::isahc import. Done means the provided wasm setup compiles without error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.