2017-07-21 16:49:38 +00:00
|
|
|
<!-- Thanks for filing a bindgen issue! We appreciate it :-) -->
|
|
|
|
|
2017-02-16 19:35:22 +00:00
|
|
|
### Input C/C++ Header
|
|
|
|
|
|
|
|
```C++
|
2017-07-05 22:00:07 +00:00
|
|
|
// Insert your minimal C or C++ header here.
|
|
|
|
//
|
|
|
|
// It should *NOT* have any `#include`s! Not all systems have the same header
|
|
|
|
// files, and therefore any `#include` harms reproducibility. Additionally,
|
|
|
|
// the test case isn't minimal since the included file almost assuredly
|
|
|
|
// contains things that aren't necessary to reproduce the bug, and makes
|
2017-07-17 17:18:35 +00:00
|
|
|
// tracking it down much more difficult.
|
|
|
|
//
|
|
|
|
// Use the `--dump-preprocessed-input` flag or the
|
|
|
|
// `bindgen::Builder::dump_preprocessed_input` method to make your test case
|
|
|
|
// standalone and without `#include`s, and then use C-Reduce to minimize it:
|
2018-11-24 14:36:57 +00:00
|
|
|
// https://github.com/rust-lang/rust-bindgen/blob/master/CONTRIBUTING.md#using-creduce-to-minimize-test-cases
|
2017-02-16 19:35:22 +00:00
|
|
|
```
|
|
|
|
|
2017-05-12 07:36:45 +00:00
|
|
|
### Bindgen Invocation
|
2017-02-16 19:35:22 +00:00
|
|
|
|
2017-05-01 20:04:42 +00:00
|
|
|
<!-- Place either the `bindgen::Builder` or the command line flags used here. -->
|
2017-02-16 19:35:22 +00:00
|
|
|
|
|
|
|
```Rust
|
|
|
|
bindgen::Builder::default()
|
|
|
|
.header("input.h")
|
2021-12-08 00:10:05 +00:00
|
|
|
.generate()
|
2017-02-16 19:35:22 +00:00
|
|
|
.unwrap()
|
|
|
|
```
|
|
|
|
|
2017-05-01 20:04:42 +00:00
|
|
|
or
|
2017-02-16 19:35:22 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
$ bindgen input.h --whatever --flags
|
|
|
|
```
|
|
|
|
|
|
|
|
### Actual Results
|
|
|
|
|
|
|
|
```
|
2017-05-01 20:04:42 +00:00
|
|
|
Insert panic message and backtrace (set the `RUST_BACKTRACE=1` env var) here.
|
2017-02-16 19:35:22 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
and/or
|
|
|
|
|
|
|
|
```rust
|
2017-05-01 20:04:42 +00:00
|
|
|
// Insert the (incorrect/buggy) generated bindings here
|
2017-02-16 19:35:22 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
and/or
|
|
|
|
|
|
|
|
```
|
|
|
|
Insert compilation errors generated when compiling the bindings with rustc here
|
|
|
|
```
|
|
|
|
|
|
|
|
### Expected Results
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Replace this with a description of what you expected instead of the actual
|
|
|
|
results. The more precise, the better! For example, if a struct in the generated
|
2017-05-01 20:04:42 +00:00
|
|
|
bindings is missing a field that exists in the C/C++ struct, note that here.
|
2017-02-16 19:35:22 +00:00
|
|
|
-->
|