-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in v2.3.2 with wasm-client, it could not compile; error[E0432]: unresolved import http_client::isahc
#345
Comments
Try building with |
Oh, But, just in case, this Issue is maybe useful for wasm users who try to use surf newbies and hasn't used it in a long time. Should keep the issue until update the related documents and tests and examples? I will leave it to authors to decide when to close the issue. Thank you! 💖 |
Honestly I wasn't really sure if that would work but cool to know that it did. |
Same version and configuration, but didn't work for me, on macOS. Error: error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support
--> /Users/bytedance/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.8/src/lib.rs:263:9
|
263 | / compile_error!("the wasm32-unknown-unknown target is not supported by \
264 | | default, you may need to enable the \"js\" feature. \
265 | | For more information see: \
266 | | https://docs.rs/getrandom/#webassembly-support");
| |________________________________________________________________________^
Compiling foreign-types v0.3.2
Compiling httparse v1.8.0
error[E0433]: failed to resolve: use of undeclared crate or module `imp`
--> /Users/bytedance/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.8/src/lib.rs:290:5
|
290 | imp::getrandom_inner(dest)
| ^^^ use of undeclared crate or module `imp`
For more information about this error, try `rustc --explain E0433`.
error: could not compile `getrandom` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
Error: Compilation of your program failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
full command: "cargo" "build" "--tests" "--target" "wasm32-unknown-unknown" |
Repro
cargo new surf-wasm-test --lib
crate-type = [ "cdylib" ]
in[lib]
surf = { version = "2.3.2", fefault-features = false, features = [ "wasm-client" ] }
in[dependencies]
cargo check --target wasm32-unknown-unknown
, and then it occur the error.Error
The text was updated successfully, but these errors were encountered: