georust / georust/proj

include pre-compiled headers, bindgen only as optional feature

Open
#44 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
186
Forks
63
PR merge metrics
No merged PRs in 30d

Description

`bindgen` accounts for the vast majority of the remaining deps for proj. Since they are build_dependencies they don't contribute to the size of the output binary, but it does take time to compile.

It seems like a popular approach is to bake in the prebuilt bindings, but then allow the user a way to manually generate via a feature flag.

e.g. [rustsqlite](https://github.com/rusqlite/rusqlite/blob/master/libsqlite3-sys/Cargo.toml#L18)
bundled bindings: https://github.com/rusqlite/rusqlite/tree/master/libsqlite3-sys/bindgen-bindings

[zstd](https://crates.io/crates/zstd-sys#build-time-bindgen)

[gdal](https://github.com/georust/gdal/blob/master/gdal-sys/build.rs#L178)
bundled bindings: https://github.com/georust/gdal/tree/master/gdal-sys/prebuilt-bindings

So achieving this would entail at least:

1. baking in bindings for the supported versions
2. including the proper one in build.rs
3. adding a `bindgen` feature maintains the current behavior.
4. ensuring there is tooling/documentation for maintainers to easily add new pre-baked bindings as new proj versions come out.

Would you be interested in merging such a thing?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.