Skip to content

Commit

Permalink
Added a note about how to generate the prebuild bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
weiznich committed Jun 13, 2024
1 parent 70c5fea commit e381d58
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Development related notices


Bindings were generated with the following command:

```sh
bindgen --distrust-clang-mangling --blocklist-type max_align_t wrapper.h -- -I PROJSRC/proj-9.4.0/src
```

If you update the above command line you also need to update the arguments for the buildtime_bindgen feature in `build.rs`
3 changes: 3 additions & 0 deletions proj-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ fn generate_bindings(include_path: std::path::PathBuf) -> Result<(), Box<dyn std
// The bindgen::Builder is the main entry point
// to bindgen, and lets you build up options for
// the resulting bindings.
// If you update the configuration here you also
// need to update the corresponding bindgen command in
// `DEVELOPMENT.md`
let bindings = bindgen::Builder::default()
.clang_arg(format!("-I{}", include_path.to_string_lossy()))
.trust_clang_mangling(false)
Expand Down

0 comments on commit e381d58

Please sign in to comment.