File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,28 @@ No MSRV bump policy has been established yet, so MSRV may increase in any releas
47
47
48
48
[ API reference documentation is on docs.rs] ( https://docs.rs/bindgen )
49
49
50
+ ## Environment Variables
51
+
52
+ In addition to the [ library API] ( https://docs.rs/bindgen ) and [ executable command-line API] [ bindgen-cmdline ] ,
53
+ ` bindgen ` can be controlled through environment variables.
54
+
55
+ End-users should set these environment variables to modify ` bindgen ` 's behavior without modifying the source code of direct consumers of ` bindgen ` .
56
+
57
+ - ` BINDGEN_EXTRA_CLANG_ARGS ` : extra arguments to pass to ` clang `
58
+ - Arguments are whitespace-separated
59
+ - Use shell-style quoting to pass through whitespace
60
+ - Examples:
61
+ - Specify alternate sysroot: ` --sysroot=/path/to/sysroot `
62
+ - Add include search path with spaces: ` -I"/path/with spaces" `
63
+
64
+ Additionally, ` bindgen ` uses ` libclang ` to parse C and C++ header files.
65
+ To modify how ` bindgen ` searches for ` libclang ` , see the [ ` clang-sys ` documentation] [ clang-sys-env ] .
66
+ For more details on how ` bindgen ` uses ` libclang ` , see the [ ` bindgen ` users guide] [ bindgen-book-clang ] .
67
+
50
68
## Contributing
51
69
52
70
[ See ` CONTRIBUTING.md ` for hacking on ` bindgen ` !] ( ./CONTRIBUTING.md )
71
+
72
+ [ bindgen-cmdline ] : https://rust-lang.github.io/rust-bindgen/command-line-usage.html
73
+ [ clang-sys-env ] : https://github.com/KyleMayes/clang-sys#environment-variables
74
+ [ bindgen-book-clang ] : https://rust-lang.github.io/rust-bindgen/requirements.html#clang
You can’t perform that action at this time.
0 commit comments