Skip to content

Commit

Permalink
chore: make image optional, use in remote
Browse files Browse the repository at this point in the history
Historically this has had one of our heavier dependency trees, though it's
currently down to about 6 crates and ~30-40KB in the final binary. That's
still not nothing, and since it's only used in the remote feature, we can
easily scope it to only be used there.
  • Loading branch information
mistydemeo committed Apr 16, 2024
1 parent f910211 commit a1745d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ default = ["remote"]
toml-serde = ["toml", "serde"]
json-serde = ["serde_json", "serde"]
toml-edit = ["toml_edit"]
remote = ["reqwest"]
remote = ["reqwest", "image"]
compression = ["compression-tar", "compression-zip"]
compression-tar = ["flate2", "tar", "xz2", "zstd"]
compression-zip = ["zip"]

[dependencies]
image = { version = "0.25.1", default-features = false }
image = { version = "0.25.1", default-features = false, optional = true }
mime = "0.3.16"
reqwest = { version = "0.11.13", optional = true, default-features = false, features = ["json", "rustls-tls"] }
thiserror = "1.0.37"
Expand Down
1 change: 1 addition & 0 deletions tests/local_write.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "image")]
#![allow(irrefutable_let_patterns)]

use std::collections::HashMap;
Expand Down

0 comments on commit a1745d6

Please sign in to comment.