I am using a Rust script called build.rs for code generation (it's not a Cargo build script). The script contains this at the top:
extern crate reqwest;
This is my Cargo.toml file:
[package]
name = "my-script"
version = "0.1.0"
edition = "2018"
[[bin]]
path = "build.rs"
name = "builder"
[dependencies]
reqwest = { version = "0.10", features = ["blocking", "json"] }
When I do cargo run, it gives me this error:
error[E0463]: can't find crate for `reqwest`
--> build.rs:1:1
|
1 | extern crate reqwest;
| ^^^^^^^^^^^^^^^^^^^^^ can't find crate
How do I make it able to find the reqwest crate?