diff --git a/Cargo.toml b/Cargo.toml index 2989755..98330ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ rust-version = "1.81.0" categories = ["science::geo"] [features] -default = ["__writer"] +default = [] http-async = ["__async", "dep:reqwest"] mmap-async-tokio = ["__async", "dep:fmmap", "fmmap?/tokio-async"] s3-async-native = ["__async-s3", "__async-s3-nativetls"] @@ -32,7 +32,6 @@ __async-s3 = ["__async", "dep:rust-s3"] __async-s3-nativetls = ["rust-s3?/use-tokio-native-tls"] __async-s3-rustls = ["rust-s3?/tokio-rustls-tls"] __async-aws-s3 = ["__async", "dep:aws-sdk-s3"] -__writer = [] [dependencies] # TODO: determine how we want to handle compression in async & sync environments diff --git a/src/header.rs b/src/header.rs index d47863e..fee75e0 100644 --- a/src/header.rs +++ b/src/header.rs @@ -6,9 +6,7 @@ use bytes::{Buf, Bytes}; use crate::error::{PmtError, PmtResult}; -#[cfg(any(feature = "__async", feature = "__writer"))] pub(crate) const MAX_INITIAL_BYTES: usize = 16_384; -#[cfg(any(test, feature = "__async", feature = "__writer"))] pub(crate) const HEADER_SIZE: usize = 127; #[allow(dead_code)] @@ -145,7 +143,7 @@ impl TryInto for u8 { } } -pub(crate) static V3_MAGIC: &str = "PMTiles"; +static V3_MAGIC: &str = "PMTiles"; static V2_MAGIC: &str = "PM"; impl Header { diff --git a/src/lib.rs b/src/lib.rs index cdf7485..b5f16a4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,8 +17,7 @@ mod error; mod header; #[cfg(feature = "__async")] mod tile; -#[cfg(feature = "__writer")] -pub mod writer; +mod writer; #[cfg(feature = "aws-s3-async")] pub use backend_aws_s3::AwsS3Backend; @@ -31,6 +30,7 @@ pub use backend_s3::S3Backend; pub use directory::{DirEntry, Directory}; pub use error::{PmtError, PmtResult}; pub use header::{Compression, Header, TileType}; +pub use writer::PmTilesWriter; // // Re-export crates exposed in our API to simplify dependency management #[cfg(feature = "__async-aws-s3")]