Skip to content
Merged
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
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ env:

jobs:
msrv:
name: Rust 1.85 MSRV
name: Rust 1.88 MSRV
runs-on: ubuntu-24.04

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
run: rustup toolchain install 1.85.0 --profile minimal --no-self-update
run: rustup toolchain install 1.88.0 --profile minimal --no-self-update

- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2

- name: Check all targets and features
run: cargo +1.85.0 check --workspace --all-targets --all-features --locked
run: cargo +1.88.0 check --workspace --all-targets --all-features --locked

checks:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
uses: actions/checkout@v4

- name: Install Rust stable for cargo-fuzz
run: rustup toolchain install 1.85.0 --profile minimal --no-self-update
run: rustup toolchain install 1.88.0 --profile minimal --no-self-update

- name: Install Rust nightly
run: rustup toolchain install nightly-2026-06-02 --profile minimal --component clippy --no-self-update
Expand All @@ -153,12 +153,12 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cargo/bin/cargo-fuzz
key: cargo-fuzz-bin-v2-0.13.1-rust-1.85.0
key: cargo-fuzz-bin-v2-0.13.1-rust-1.88.0

- name: Install cargo-fuzz
run: |
if ! command -v cargo-fuzz >/dev/null 2>&1; then
rustup run 1.85.0 cargo install cargo-fuzz --version 0.13.1 --locked
rustup run 1.88.0 cargo install cargo-fuzz --version 0.13.1 --locked
fi

- name: Cache Rust artifacts
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- upgrade `weezl` to 0.2.1 and raise the minimum supported Rust version to 1.88

## 0.8.1 - 2026-08-11

- support COG writing on `wasm32-unknown-unknown` by staging blocks and raw tiles in memory while retaining temporary-file spooling on native targets
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resolver = "2"
[workspace.package]
version = "0.8.1"
edition = "2021"
rust-version = "1.85"
rust-version = "1.88"
license = "MIT OR Apache-2.0"
repository = "https://github.com/roteiro-gis/geotiff-rust"
homepage = "https://github.com/roteiro-gis/geotiff-rust"
Expand Down
2 changes: 1 addition & 1 deletion docker/reference.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.85-bookworm
FROM rust:1.88-bookworm

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "geotiff-rust-fuzz"
version = "0.0.0"
publish = false
edition = "2021"
rust-version = "1.85"
rust-version = "1.88"

[package.metadata]
cargo-fuzz = true
Expand Down
8 changes: 6 additions & 2 deletions geotiff-writer/src/cog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,9 @@ impl<T: NumericSample, W: Write + Seek> CogTileWriter<T, W> {
"write_tile only supports single-band COG output; use write_tile_3d for multi-band tiles".into(),
));
}
if x_off % self.tile_width as usize != 0 || y_off % self.tile_height as usize != 0 {
if !x_off.is_multiple_of(self.tile_width as usize)
|| !y_off.is_multiple_of(self.tile_height as usize)
{
return Err(Error::Other(format!(
"tile offsets must align to tile boundaries of {}x{}, got ({x_off},{y_off})",
self.tile_width, self.tile_height
Expand Down Expand Up @@ -1279,7 +1281,9 @@ impl<T: NumericSample, W: Write + Seek> CogTileWriter<T, W> {
y_off: usize,
data: &ndarray::ArrayView3<T>,
) -> Result<()> {
if x_off % self.tile_width as usize != 0 || y_off % self.tile_height as usize != 0 {
if !x_off.is_multiple_of(self.tile_width as usize)
|| !y_off.is_multiple_of(self.tile_height as usize)
{
return Err(Error::Other(format!(
"tile offsets must align to tile boundaries of {}x{}, got ({x_off},{y_off})",
self.tile_width, self.tile_height
Expand Down
8 changes: 6 additions & 2 deletions geotiff-writer/src/tile_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ impl<T: NumericSample, W: Write + Seek> StreamingTileWriter<T, W> {
"write_tile only supports single-band output; use write_tile_3d for multi-band tiles".into(),
));
}
if x_off % self.tile_width as usize != 0 || y_off % self.tile_height as usize != 0 {
if !x_off.is_multiple_of(self.tile_width as usize)
|| !y_off.is_multiple_of(self.tile_height as usize)
{
return Err(Error::Other(format!(
"tile offsets must align to tile boundaries of {}x{}, got ({x_off},{y_off})",
self.tile_width, self.tile_height
Expand Down Expand Up @@ -151,7 +153,9 @@ impl<T: NumericSample, W: Write + Seek> StreamingTileWriter<T, W> {
y_off: usize,
data: &ndarray::ArrayView3<T>,
) -> Result<()> {
if x_off % self.tile_width as usize != 0 || y_off % self.tile_height as usize != 0 {
if !x_off.is_multiple_of(self.tile_width as usize)
|| !y_off.is_multiple_of(self.tile_height as usize)
{
return Err(Error::Other(format!(
"tile offsets must align to tile boundaries of {}x{}, got ({x_off},{y_off})",
self.tile_width, self.tile_height
Expand Down
2 changes: 1 addition & 1 deletion tiff-core/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ impl ColorMap {
}

pub fn from_tag_values(values: &[u16]) -> Result<Self, String> {
if values.len() % 3 != 0 {
if !values.len().is_multiple_of(3) {
return Err(format!(
"ColorMap tag length must be divisible by 3, got {} values",
values.len()
Expand Down
2 changes: 1 addition & 1 deletion tiff-reader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ndarray = { workspace = true }
thiserror = { workspace = true }
memmap2 = { workspace = true }
flate2 = { version = "1.0.35", default-features = false, features = ["zlib-rs"] }
weezl = "0.1"
weezl = "0.2"
lru = "0.16.3"
parking_lot = "0.12"

Expand Down
2 changes: 1 addition & 1 deletion tiff-writer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ lerc-core = { workspace = true }
lerc-writer = { workspace = true }
thiserror = { workspace = true }
flate2 = { version = "1.0.35", default-features = false, features = ["zlib-rs"] }
weezl = "0.1"
weezl = "0.2"
half = { workspace = true, optional = true }

[features]
Expand Down
2 changes: 1 addition & 1 deletion tiff-writer/src/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fn compress_block_jpeg<T: TiffWriteSample>(
if pixels_per_row == 0 {
return Ok(Vec::new());
}
if samples.len() % pixels_per_row != 0 {
if !samples.len().is_multiple_of(pixels_per_row) {
return Err(Error::CompressionFailed {
index,
reason: format!(
Expand Down
Loading