2 stable releases
new 3.100.4 | Feb 16, 2025 |
---|---|
3.100.0 |
|
#45 in Geospatial
461 downloads per month
1MB
25K
SLoC
π gdal-win
πΊοΈ GDAL for Rust / Windows π―
gdal-win
configures prebuilt GDAL libraries and bindings for Rust development on Windows. It automatically sets up GDAL binaries obtained from GISInternals and utilizes the GDAL Rust wrapper / bindings from georust/gdal.
β¨ Features
- β‘ Precompiled GDAL binaries for Windows x64 from GISInternals.
- π¦ Rust bindings to GDAL from georust/gdal.
- π§ Automatically configures GDAL using
gdal-setup
internally. - π οΈ Simplifies GDAL setup for Rust developers on Windows.
π¦ Setup
Ensure you have Rust installed. You can then add gdal-win
to your Rust project by including the following in your Cargo.toml
:
[package]
name = "gdal-win-example"
version = "0.1.0"
edition = "2021"
[dependencies]
gdal-win = "*"
[build-dependencies]
gdal-setup = "*"
Ensure your project includes a build.rs
file to set up GDAL automatically:
// build.rs
fn main() {
gdal_setup::setup();
}
This will configure the necessary environment for GDAL during the build process, including setting up Static Libraries (gdal_i.lib
) and DLLs.
π₯ Example Usage
Here is an example main.rs
to get the GDAL version report:
use gdal_win::version::VersionInfo;
fn main() {
let report = VersionInfo::version_report();
println!("GDAL Version Report:\n{}", report);
}
More Examples: https://github.com/georust/gdal/tree/master/examples
π₯οΈ Compatibility
- β Tested and working on Windows x64.
π License
This project follows the licensing terms of georust/gdal and GDAL libraries from GISInternals.
π Acknowledgments
- π¦ GeoRust for maintaining the Rust GDAL bindings.
- π GISInternals for providing Windows builds of GDAL.
π€ Contributions & Issues
We welcome feature requests, bug reports, and improvements! Feel free to open an issue or submit a pull request. π
Dependencies
~3β13MB
~169K SLoC