Nadrieril / dhall-rust

Maintainable configuration files, for Rust users
Other
303 stars 27 forks source link

Make reqwest an optional dependency #169

Closed valpackett closed 3 years ago

valpackett commented 4 years ago

Even on desktop platforms, it would be useful to be able to disable the web download stuff completely using a cargo feature.

Nadrieril commented 4 years ago

Is it because the dependency is painful, or is it from a security perspective that you'd rather not allow remote imports? If it's the latter, I had planned to add an option to disable or whitelist remote imports to the Deserializer interface. Would that solve your problem?

valpackett commented 4 years ago

It's both, really.

Nadrieril commented 4 years ago

I guess it's not unreasonable because reqwest pulls in many things. But that won't be at the top of my priority list

Nadrieril commented 4 years ago

I discovered https://docs.rs/attohttpc/0.14.0/attohttpc/ , which is much lighter than reqwest and seems like it would do the job nicely. I wouldn't mind using that instead, it might even work under wasm

Nadrieril commented 4 years ago

Nope, it doesn't work under wasm. Since I eventually need async imports in order to get remote imports under wasm, I have to stay with reqwest :(