Skip to content

Commit 7c13100

Browse files
Merge #80
80: update bindgen to fix incorrect proj results on apple silicon r=lnicola a=michaelkirk FIXES #52 Co-authored-by: Michael Kirk <[email protected]>
2 parents 77ecb97 + ba3f12e commit 7c13100

File tree

5 files changed

+294
-20
lines changed

5 files changed

+294
-20
lines changed

proj-sys/CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Unreleased
2+
3+
- Update bindgen to fix proj-sys giving some incorrect results on Apple Silicon
4+
15
# 0.19.0
26
- Update to PROJ 7.2.1
37

proj-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ links = "proj"
1313
[dependencies]
1414

1515
[build-dependencies]
16-
bindgen = "0.56.0"
16+
bindgen = "0.58.0"
1717
pkg-config = "0.3.17"
1818
cmake = "0.1"
1919
flate2 = "1.0.14"

proj-sys/MAINTAINERS.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Notes for maintainers
2+
3+
## Generating docs from bindings
4+
5+
Whenever updating libproj or bindgen you must regenerate the prebuilt bindings
6+
at `proj-sys/src/bindings_docs-rs.rs`.
7+
8+
These prebuilt bindings are only used for generating documentation - e.g. on
9+
https://docs.rs. Actual usage of the crate depends on dynamically built bindings, but
10+
that entails having libproj installed or built from source, which we can't
11+
expect docs.rs to do.
12+
13+
## To update the prebuilt bindings
14+
15+
Currently the process looks like:
16+
17+
```
18+
cd proj-sys
19+
cargo clean
20+
cargo build
21+
find ../target/proj-sys-* -name bindings_docs-rs.rs
22+
```
23+
24+
copy that file over the `src/bindings_docs-rs.rs`, but retain the header:
25+
26+
```
27+
/* THESE ARE NOT LIVE BINDINGS */
28+
/* THEY EXIST FOR USE BY DOCS-RS ONLY */
29+
```
30+

proj-sys/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
5050
.clang_arg(format!("-I{}", include_path.to_string_lossy()))
5151
.trust_clang_mangling(false)
5252
.size_t_is_usize(true)
53-
.blacklist_type("max_align_t")
53+
.blocklist_type("max_align_t")
5454
// The input header we would like to generate
5555
// bindings for.
5656
.header("wrapper.h")

0 commit comments

Comments
 (0)