Age | Commit message (Collapse) | Author |
|
Fixes #2240
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"Far each ..." should be "For each ..."
|
|
|
|
This is done to deal with the existing vulnerabilities in older versions of `thread_local` and `regex`
|
|
|
|
* Disallow constant values that could cause problems with clang 15
* Fix clippy warnings
|
|
|
|
|
|
|
|
|
|
|
|
Prepare 0.64.0 Release
---------
Co-authored-by: Christian Poveda <christian.poveda@ferrous-systems.com>
|
|
|
|
* 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>
|
|
|
|
|
|
|
|
Fixes #2396.
This makes it possible to workaround cc/bindgen issues with esp-rs
projects by using only environment varaibles (TARGET_CC, CLANG_PATH,
etc). Without this, it requires modifying each crate's build.rs that
you try to depend on to add a target option passed along to clang.
|
|
|
|
* custom derives after DeriveInfo
* Introduce `TypeKind` instead of `CompKind`
* Add tests
* Emit CLI flags for callbacks
* update changelog
* run rustfmt
* fix tests
* fix features
Co-authored-by: Christian Poveda <christian.poveda@ferrous-systems.com>
|
|
|
|
* Migrate CLI argument parsing to the derive API
* Fix docs
* Fix tests
* Use `override_usage`
* Update changelog
|
|
|
|
|
|
* gh action for merging main to master on pr merge
* remove pull_request as trigger. only use push, that is after merging the pull_request
|
|
* Update to clap 4.
* Bump MSRV to minimum required by clap 4.
* Mention clap update in CHANGELOG.
|
|
|
|
Signed-off-by: Amanjeev Sethi <aj@amanjeev.com>
|
|
* codegen: Look through typedefs to detect void return type.
And reuse a bit more code.
Should fix #2377, but needs a test (can't run tests atm).
* Add tests
* Run rustfmt
* Update changelog
Co-authored-by: Christian Poveda <christian.poveda@ferrous-systems.com>
|
|
|
|
* Document how to format code
* Fix typo
* Fix formatting
* Ignore code snippet
|
|
|
|
|
|
* Bump `clang-sys` version
* add libtinfo5 package to fix CI
|
|
The bug only affects virtual inheritance, so instead disable layout
tests in the test that we know is broken. Not generating layout tests is
wrong anyways, because the offset would be wrong.
|
|
|
|
* This change updates `ParseCallbacks::generated_name_override` to accept a second parameter indicating the kind of item the name applies to (currently, either `Function` or `Var`).
* A `CallbackItemKind` enum was added to serve as the type for this second parameter.
* Tests have been updated to verify that the names of both function and variable can be updated by this callback.
|
|
|
|
Fixes #2008.
Example:
```c
enum Enum { Variant };
typedef int16_t Enum;
```
This is valid and idiomatic C (though not valid C++). `cbindgen` uses this idiom as the default C translation of Rust enums, the equivalent of what would be `enum Enum : int16_t { Variant };` in C++.
`bindgen header.h` before:
```rust
pub const Enum_Variant: Enum = 0;
pub type Enum = ::std::os::raw::c_uint;
pub type Enum = i16;
```
```console
error[E0428]: the name `Enum` is defined multiple times
--> generated.rs:3:1
|
2 | pub type Enum = ::std::os::raw::c_uint;
| --------------------------------------- previous definition of the type `Enum` here
3 | pub type Enum = i16;
| ^^^^^^^^^^^^^^^^^^^^ `Enum` redefined here
|
= note: `Enum` must be defined only once in the type namespace of this module
```
After:
```rust
pub const Enum_Variant: Enum = 0;
pub type Enum = i16;
```
|
|
|
|
|
|
|
|
|