From 94bd808e3a90590c4623abd0d6cd6506547eacf9 Mon Sep 17 00:00:00 2001 From: Hiroaki Yutani Date: Tue, 3 Jun 2025 01:28:08 +0900 Subject: [PATCH 1/2] Expose bundled feature --- .github/workflows/ci.yml | 6 +++--- Cargo.toml | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b276efd..ffdea279 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,15 +154,15 @@ jobs: # drivers do not change the rust code # enable `driver_sqlite` to force statically linking libsqlite3 for proj - name: Check with Clippy (bundled) - run: cargo clippy --all-targets --features "gdal-sys/bundled gdal-src gdal-src/driver_sqlite" -- -D warnings + run: cargo clippy --all-targets --features bundled -- -D warnings # we only build tests here as we have disabled features # that are required for running tests - name: Build bundled gdal (minimal features) # we use cargo test --no-run here because # tests do not pass due to missing libgeos but we want to have a complete build (including linking) - run: cargo test --features "gdal-sys/bundled gdal-src gdal-src/driver_sqlite" --no-run + run: cargo test --features bundled --no-run - name: Test bundled (all features) - run: cargo test --features "gdal-sys/bundled gdal-src gdal-src/all_drivers gdal-src/geos_static" + run: cargo test --features bundled_all - name: Check that all files necessary to build gdal are included if: matrix.os != 'macos-13' run: cargo package -p gdal-src -F all_drivers diff --git a/Cargo.toml b/Cargo.toml index 8bfeaca7..52c2d852 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,8 @@ rust-version = "1.80" default = [] bindgen = ["gdal-sys/bindgen"] array = ["ndarray"] +bundled = ["gdal-sys/bundled", "gdal-src", "gdal-src/driver_sqlite"] +bundled_all = ["gdal-sys/bundled", "gdal-src", "gdal-src/all_drivers", "gdal-src/geos_static"] [dependencies] thiserror = "2.0" From bd4b60051b90f6ff19fb161f12dafac6e38c83be Mon Sep 17 00:00:00 2001 From: Hiroaki Yutani Date: Tue, 3 Jun 2025 06:56:35 +0900 Subject: [PATCH 2/2] Add a CHANGELOG item --- CHANGES.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 8545701f..ae8834e8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,10 @@ ## Unreleased +### Added + + - Add `bundled` and `bundled_all` feature to the gdal crate for building and statically linking a minimal bundled version of GDAL. + ### Fixed - Bump referenced gdal version to 3.10.3