Closed andoriyu closed 2 years ago
Try building it with --target wasm32-unknown-unknown
. This crate is only for use in browsers using wasm.
Try building it with
--target wasm32-unknown-unknown
. This crate is only for use in browsers using wasm.
@devashishdxt oh weird. My wasm crate is just in workspace with other crates and cargo check
generally just worked fine. Anyways, setting target fixed it.
Any reason you've switched from web-sys's fetch api to reqwest
in this fork?
Any reason you've switched from web-sys's fetch api to
reqwest
in this fork?
reqwest
internally uses fetch
API. I preferred it because it has a clean and easy to use API.
In addition to that, it'll be easy to extend this crate in future for use outside of browsers to connect to grpc-web
servers.
@devashishdxt would you mind if I mark wasm-only
stuff to be compiled only on wasm32-unknown-unknown
target? I have a workspace that has wasm and not wasm crates, right now, it can't be built.
per-pacakge-target is still an unstable feature.
I'm not sure what you mean by "mark wasm-only
stuff to compile". Can you create a PR? So that I can review?
In
0.1.1
: