Skip to content

Commit

Permalink
Remove __writer feature
Browse files Browse the repository at this point in the history
  • Loading branch information
pka committed Oct 23, 2024
1 parent 6c65266 commit 72f5762
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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
Expand Down
4 changes: 1 addition & 3 deletions src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -145,7 +143,7 @@ impl TryInto<TileType> for u8 {
}
}

pub(crate) static V3_MAGIC: &str = "PMTiles";
static V3_MAGIC: &str = "PMTiles";
static V2_MAGIC: &str = "PM";

impl Header {
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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")]
Expand Down

0 comments on commit 72f5762

Please sign in to comment.