Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: "cargo check"
run: cargo check --all --all-features

- name: "cargo test"
run: |
cargo test --all
cargo test --all --all-features
- run: cargo install cargo-all-features

- name: "cargo test all features"
run: cargo test-all-features
21 changes: 17 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,27 @@ flate2 = "1.0.20"
futures = "0.3.31"
jpeg = { package = "jpeg-decoder", version = "0.3.0", default-features = false }
num_enum = "0.7.3"
object_store = "0.12"
object_store = { version = "0.12", optional = true }
# In the future we could make this feature-flagged, but for now we depend on
# object_store which uses reqwest.
reqwest = { version = "0.12", default-features = false }
reqwest = { version = "0.12", default-features = false, optional = true }
thiserror = "1"
tokio = { version = "1.43.0", optional = true }
tokio = { version = "1.43.0", optional = true, features = ["fs", "io-util"] }
weezl = "0.1.0"

[dev-dependencies]
tiff = "0.9.1"
tokio = { version = "1.9", features = ["macros", "fs", "rt-multi-thread"] }
tokio = { version = "1.9", features = ["macros", "fs", "rt-multi-thread", "io-util"] }

[features]
default = ["object_store", "reqwest"]
tokio = ["dep:tokio"]
reqwest = ["dep:reqwest"]
object_store = ["dep:object_store"]

[package.metadata.cargo-all-features]
# If your crate has a large number of optional dependencies, skip them for speed
# skip_optional_dependencies = true

# Exclude certain features from the build matrix
denylist = ["default"]
1 change: 1 addition & 0 deletions src/cog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ impl TIFF {
}
}

#[cfg(feature = "object_store")]
#[cfg(test)]
mod test {
use std::io::BufReader;
Expand Down
2 changes: 2 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub enum AsyncTiffError {
JPEGDecodingError(#[from] jpeg::Error),

/// Error while fetching data using object store.
#[cfg(feature = "object_store")]
#[error(transparent)]
ObjectStore(#[from] object_store::Error),

Expand All @@ -32,6 +33,7 @@ pub enum AsyncTiffError {
InternalTIFFError(#[from] crate::tiff::TiffError),

/// Reqwest error
#[cfg(feature = "reqwest")]
#[error(transparent)]
ReqwestError(#[from] reqwest::Error),

Expand Down
Loading