cloudflare / cloudflare/cloudflare-rs

This crate does not work with nicely with a WASM worker

Open
#110 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
316
Forks
111
PR merge metrics
No merged PRs in 30d

Description

I'm evaluating https://workers.dev as a solution for a Rust based web application.

If you run the following:

```sh
wrangler generate my-worker --type=rust
cd my-worker
vim Cargo.toml # Then add `cloudflare = "0.6.4"`
wrangler build
```

The build step will fail and give the following error:

```text
Compiling cloudflare v0.6.4
error[E0432]: unresolved import `reqwest::blocking`
--> /home/username/.cargo/registry/src/github.com-1ecc6299dc9ec823/cloudflare-0.6.4/src/framework/auth.rs:1:14
|
1 | use reqwest::blocking::RequestBuilder;
| ^^^^^^^^ could not find `blocking` in `reqwest`

```

I haven't looked deeply into this. But I believe this could due to `wasm-bindgen`.

How do you use cloudflare-rs within a Rust Cloudflare worker?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.