Skip to content

Commit

Permalink
add a paragraph in README about bindgen-static and bindgen-runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Congyuwang committed Nov 4, 2024
1 parent 0208365 commit 649afd5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,13 @@ The feature `mt_static` will request the library to be built with [/MT](https://
flag, which results in library using the static version of the run-time library.
*This can be useful in case there's a conflict in the dependecy tree between different
run-time versions.*

## Switch between static and dynamic linking for bindgen (features `bindgen-static` and `bindgen-runtime`)

The feature `bindgen-runtime` will enable the `runtime` feature of bindgen, which dynamically
links to libclang. This is suitable for most platforms, and is enabled by default.

The feature `bindgen-static` will enable the `static` feature of bindgen, which statically
links to libclang. This is suitable for musllinux platforms, such as Alpine linux.
To build on Alpine linux for example, build with
`--no-default-features --features bindgen-static,other-features-1,other-features-2`.

0 comments on commit 649afd5

Please sign in to comment.