[package]
name = "geonative-pmtiles"
description = "Pure-Rust PMTiles v3 reader and writer (single-file tile archive with Hilbert-ordered directories) for the geonative geospatial library"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
authors.workspace = true
rust-version.workspace = true
categories.workspace = true
keywords.workspace = true

[dependencies]
thiserror = "2"
# Gzip is the PMTiles spec's default for both internal-dirs and tiles.
# Pure-Rust backend keeps us cross-compile-friendly.
flate2 = { version = "1", default-features = false, features = ["rust_backend"] }

# Optional async / object-store stack. Enabled via `s3` feature.
tokio = { version = "1", optional = true, features = ["rt", "io-util", "macros"] }
object_store = { version = "0.13", optional = true, features = ["aws"] }
bytes = { version = "1", optional = true }

[features]
default = []
# Async, object-store-backed reader. Range-fetches the 127 B header, then
# the root directory, then per-tile reads. A 10 GB PMTiles in S3 serves a
# single tile from ~3 GETs total without ever downloading the whole file.
s3 = ["dep:tokio", "dep:object_store", "dep:bytes"]

[dev-dependencies]
tempfile = "3"
# Async test infra. Only pulled in for `cargo test --features s3`.
tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "macros", "fs"] }
object_store = { version = "0.13", features = ["aws"] }
