-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from lnicola/bindgen
Use bindgen for gdal-sys
- Loading branch information
Showing
47 changed files
with
37,531 additions
and
1,117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ rust: | |
|
||
script: | ||
- cargo test | ||
- cargo test --features bindgen | ||
- cargo doc | ||
|
||
after_success: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,17 +2,20 @@ | |
name = "gdal" | ||
description = "GDAL bindings for Rust" | ||
license = "MIT" | ||
version = "0.3.1" | ||
version = "0.4.0" | ||
authors = ["Alex Morega <[email protected]>"] | ||
repository = "https://github.com/georust/rust-gdal" | ||
documentation = "https://georust.github.io/rust-gdal/" | ||
|
||
[features] | ||
bindgen = ["gdal-sys/bindgen"] | ||
|
||
[dependencies] | ||
error-chain = "0.11" | ||
libc = "0.2" | ||
geo = "0.6" | ||
gdal-sys = { path = "gdal-sys", version = "0.1"} | ||
num-traits = "0.1" | ||
geo = "0.7" | ||
gdal-sys = { path = "gdal-sys", version = "0.2"} | ||
num-traits = "0.2" | ||
|
||
[workspace] | ||
members = ["gdal-sys"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,20 @@ | |
name = "gdal-sys" | ||
description = "Low level GDAL bindings for Rust" | ||
license = "MIT" | ||
version = "0.1.1" | ||
version = "0.2.0" | ||
repository = "https://github.com/georust/rust-gdal" | ||
authors = ["Johannes Drönner <[email protected]>"] | ||
build="build.rs" | ||
|
||
[features] | ||
default = ["min_gdal_version_1_11"] | ||
min_gdal_version_1_11 = [] | ||
min_gdal_version_2_0 = [] | ||
min_gdal_version_2_1 = [] | ||
min_gdal_version_2_2 = [] | ||
|
||
[dependencies] | ||
libc = "0.2" | ||
libc = "0.2" | ||
|
||
[build-dependencies] | ||
bindgen = { git = "https://github.com/rust-lang-nursery/rust-bindgen", rev="f36f4e3", optional = true } | ||
pkg-config = "0.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,36 @@ | ||
# gdal-sys | ||
|
||
[![Build Status](https://travis-ci.org/georust/rust-gdal.png?branch=master)](https://travis-ci.org/georust/rust-gdal) | ||
|
||
Low level [GDAL](http://gdal.org/) bindings for [Rust](http://www.rust-lang.org/). | ||
|
||
Contains: | ||
|
||
* mapping of data types | ||
* raster (GDAL) and vector (ORG) operations | ||
* error handling | ||
* spatial reference operations | ||
|
||
## build | ||
|
||
The build script should work an Linux and Windows systems. | ||
|
||
On Windows the `GDAL_HOME` environment variable is expected to point to the `GDAL` folder. | ||
|
||
* windows-msvc requires `gdal_i.lib` to be found in `GDAL_HOME\lib`. | ||
* windows-gnu requires either `gdal_i.lib` in `GDAL_HOME\lib` OR `gdal{version}.dll` in `GDAL_HOME\bin`. | ||
# gdal-sys | ||
|
||
[![Build Status](https://travis-ci.org/georust/rust-gdal.png?branch=master)](https://travis-ci.org/georust/rust-gdal) | ||
|
||
Low level [GDAL](http://gdal.org/) bindings for [Rust](http://www.rust-lang.org/). | ||
|
||
Contains: | ||
|
||
* mapping of data types | ||
* raster (GDAL) and vector (OGR) operations | ||
* error handling | ||
* spatial reference operations | ||
|
||
## Build | ||
|
||
The build script should work an Linux and Windows systems. It can be configured with a couple of environment variables: | ||
|
||
* if `GDAL_INCLUDE_DIR` or `GDAL_LIB_DIR` are defined, they will be used | ||
* otherwise, if `GDAL_HOME` is defined, the build script looks for `GDAL_HOME/include`, `GDAL_HOME/lib` and `GDAL_HOME/bin` | ||
* finally, `pkg-config` is queried to determine the `GDAL` location | ||
* you can define `GDAL_STATIC` to link `GDAL` statically | ||
|
||
The include directories are only used if you choose to generate the bindings at build time. | ||
|
||
On Linux, building should work out-of-the-box. | ||
|
||
On Windows, the easiest solution is to point the `GDAL_HOME` environment variable to the `GDAL` folder. | ||
|
||
* `windows-msvc` requires `gdal_i.lib` to be found in `%GDAL_HOME%\lib`. | ||
* `windows-gnu` requires either `gdal_i.lib` in `%GDAL_HOME%\lib` OR `gdal{version}.dll` in `%GDAL_HOME%\bin`. | ||
|
||
## Pre-generated bindings | ||
|
||
By default, the bundled bindings will be used. To generate them when building the crate, the `bindgen` feature must be enabled. | ||
|
||
You can enable one of the `min_gdal_version_X_Y` features to pick a specific version of the pre-generated bindings. For more information, see the [Cargo.toml](Cargo.toml) file. |
Oops, something went wrong.