third_party_rust_bindgen/bindgen-integration
Christian Poveda Ruiz 2be14a3345
Generate extern wrappers for inlined functions (#2335)
* Generate extern wrappers for inlined functions

If bindgen finds an inlined function and the
`--generate-extern-functions` options is enabled, then:

- It will generate two new source and header files with external
  functions that wrap the inlined functions.
- Rerun `Bindings::generate` using the new header file to include these
  wrappers in the generated bindings.

The following additional options were added:
- `--extern-function-suffix=<suffix>`: Adds <suffix> to the name of each
  external wrapper function (`__extern` is used by default).
- `--extern-functions-file-name=<name>`: Uses <name> as the file name
  for the header and source files (`extern` is used by default).
- `--extern-function-directory=<dir>`: Creates the source and header
  files inside <dir> (`/tmp/bindgen` is used by default).

The C code serialization is experimental and only supports a very
limited set of C functions.

Fixes #1090.

---------

Co-authored-by: Amanjeev Sethi <aj@amanjeev.com>
2023-02-07 10:13:48 -05:00
..
cpp allow custom derives on enums 2021-11-26 02:33:39 +01:00
include Integration test include directory paths for depfiles. 2021-04-24 00:51:44 +02:00
src Generate extern wrappers for inlined functions (#2335) 2023-02-07 10:13:48 -05:00
.gitattributes Skip input headers in Linguist statistics 2022-06-05 19:47:20 +02:00
build.rs Generate extern wrappers for inlined functions (#2335) 2023-02-07 10:13:48 -05:00
Cargo.toml Generate extern wrappers for inlined functions (#2335) 2023-02-07 10:13:48 -05:00