Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.43
->0.71.1
Release Notes
rust-lang/rust-bindgen (bindgen)
v0.71.1
Compare Source
Fixed
--version
and--generate-shell-completions
(#3040)v0.71.0
Compare Source
Added
ParseCallbacks::new_item_found
callback to expose the original and final name of structs, unions and enums (#2658).field_type_name
field toFieldInfo
to expose the name of the type of a field (#2863)--with-attribute-custom
flag (#2866)--rust-target
to any Rust version supported by bindgen (#2993)--generate-cstr
flag is used for Rust targets after 1.77 under the 2021 edition (#2996)--rust-edition
flag which allows to select which Rust edition to target. (#3002, #3013)unsafe extern
instead ofextern
in blocks for any Rust target after 1.82. (#3015)Changed
--wrap-static-fns
related options no longer require the experimental feature or flag (#2928)Display
implementation instead of theDebug
one forBindgenError
inbindgen-cli
(#3005)Removed
Fixed
libloading
are now wrapped inunsafe
blocks when using dynamic loading (#2961)ParseCallbacks::field_visibility
callback is now called for newtypes as well (#2967)addr_of
andaddr_of_mut
macros under the 1.51 rust version (#2988)v0.70.1
Compare Source
Added
Changed
Removed
Fixed
const
layout tests were triggering theunnecessary_operation
andidentity_op
clippy warnings.Security
v0.70.0
Compare Source
Added
Changed
bindgen-cli
errors to stderr instead of stdout (#2840)Removed
Fixed
--formatter=prettyplease
not working inbindgen-cli
by addingprettyplease
feature andenabling it by default for
bindgen-cli
(#2789) .--allowlist-item
so anonymous enums are no longer ignored (#2827).f64::INFINITY
,f64::NEG_ INFINITY
,f64::NAN
(#2854).Security
tempfile
andrustix
due to GHSA-c827-hfw6-qwvm.v0.69.5
Compare Source
Install bindgen-cli 0.69.5
Install prebuilt binaries via shell script
Download bindgen-cli 0.69.5
v0.69.4
Compare Source
Added
Changed
Removed
Fixed
Security
v0.69.3
Compare Source
Added
Changed
Removed
Fixed
Security
v0.69.2
Compare Source
Added
Changed
Removed
Fixed
Security
v0.69.1
Compare Source
Fixed
bindgen -v
without an input header argument.v0.69.0
Compare Source
Added
ParseCallbacks::header_file
callback which runs on every filename passed toBuilder::header
.CargoCallbacks::new
constructor which emits a cargo-rerun linefor every input header file by default.
CargoCallbacks::rerun_on_header_files
method to configure whethera cargo-rerun line should be emitted for every input header file.
Changed
--wrap-static-fns
feature was updated so function types that has noargument use
void
as its sole argument.CargoCallbacks
is no longer a unit-likestruct and the
CargoCallbacks
constant was added to mitigate the breaking nature of thischange. This constant has been marked as deprecated and users will have to
use the new
CargoCallbacks::new
method in the future.Removed
Fixed
bindgen-cli
with a static libclang.as the target's pointer size.
Self
,self
,crate
orsuper
.Security
v0.68.1
Compare Source
Fixed
v0.68.0
Compare Source
Added
system
ABI is now supported as an option for the--override-abi
flag.allowlist_item
method and the--allowlist-item
flag have beenincluded to filter items regardless or their kind.
Changed
Clone
implementation for_BindgenUnionField
has been changed to passthe
incorrect_clone_impl_on_copy_type
Clippy lint.c_unwind
ABI can be used without a feature gate for any Rust target versionequal to or greater than 1.71.
This comes as a result of the ABI being stabilised (in Rust 1.71).
prettyplease version.
CStr
constants when using the--generate-cstr
option.
Removed
extra_assert
andextra_assert_eq
macros are no longer exported.Fixed
Rust keyword that cannot be a raw identifier, such as:
self
,crate
,super
orSelf
.v0.66.1
Compare Source
Removed
v0.66.0
Compare Source
Added
--generate-cstr
CLI flag to generate string constants as&CStr
instead of
&[u8]
. (Requires Rust 1.59 or higher.)--generate-shell-completions
CLI flag to generate completions fordifferent shells.
--wrap-static-fns
option can now wrapva_list
functions as variadic functionswith the experimental
ParseCallbacks::wrap_as_variadic_fn
method.ParseCallbacks::field_visibility
method to modify field visibility.Changed
&[u8; SIZE]
)instead of arrays (
[u8; SIZE]
) to match UTF-8 strings.void
no longer contain areturn
statement and only call the static function instead.
--wrap-static-fns
option no longer emits wrappers for static variadicfunctions.
--depfile
orBuilder::depfile
will now properlygenerate module names and paths that include spaces by escaping them. To make
the escaping clear and consistent, backslashes are also escaped.
bitflags
dependency to 2.2.1. This changes the API ofCodegenConfig
.feature when depending on
bindgen
as a library.auto-generated
_bindgen_*
names having a different index.always public. Now, they follow the default visibility for the type they are
in.
bitfield unit field and its related functions now have their visibility
determined based on the most private between the default visibility and the
actual visibility of the bitfields within the unit.
Removed
Remove redundant Cargo features, which were all implicit:
env_logger
andlog
removed in favor oflogging
log
removed in favor oflogging
which
removed in favor ofwhich-logging
annotate-snippets
removed in favor ofexperimental
Prettyplease is available as a
Formatter
variant now.v0.65.1
Compare Source
Fixed
Builder::rustfmt_bindings
method was added back and tagged asdeprecated instead of being removed.
v0.65.0
Compare Source
Added
Builder::default_visibility
method and the--default-visibility
flag to set the default visibility of fields. (#2338)--formatter
CLI flag with the valuesnone
,rustfmt
andprettyplease
to select which tool will be used to format the bindings. Thedefault value is
rustfmt
. (#2453)Builder::formatter
method and theFormatter
type to selectwhich tool will be used to format the bindings. (#2453)
Builder::emit_diagnostics
method and the--emit-diagnostics
flag to enable emission of diagnostic messages under the
experimental
feature. (#2436)
"efiapi"
calling convention (#2490).ParseCallbacks::read_env_var
method which runs everytimebindgen
reads and environment variable. (#2400)ParseCallbacks::generated_link_name_override
method which allowoverriding the link name of items. (#2425)
enum
s when generating code while using the--wrap-static-fns
feature. (#2415)Changed
void
as their single argumentinstead of having no arguments when the
--wrap-static-fns
flag is used.(#2443)
--wrap-static-fns
flag is enabled nowcontains
#include
directives with all the input headers and all the sourcecode added with the
header_contents
method. (#2447)--wrap-static-fns
flag no longer usesasm
labeling and the link name of static wrapper functions is allowed tobe mangled. (#2448)
type
aliases now matches the commentsof their
typedef
counterparts instead of using the comments of the aliasedtypes. (#2463)
Builder::rustfmt_bindings
methods and the--no-rustfmt-bindings
flagare now deprecated in favor of the formatter API. (#2453)
Removed
--use-msvc-mangling
,--rustfmt-bindings
and--size_t-is-usize
. (#2408)Bindings::emit_warnings
andBindings::warnings
methods were removedin favor of
--emit-diagnostics
. (#2436)byte slices. (#2487)
v0.64.0
Compare Source
Added
--with-derive-custom
,--with-derive-custom-struct
,--with-derive-custom-enum
and--with-derive-custom-enum
to add custom derives from the CLI.--experimental
flag onbindgen-cli
and theexperimental
feature on
bindgen
to gate experimental features whose implementation isincomplete or are prone to change in a non-backwards compatible manner.
--wrap-static-fns
,--wrap-static-fns-suffix
and--wrap-static-fns-path
to generate C function wrappers for
static
orstatic inline
functions.This feature is experimental.
Changed
enum
and atypedef
with the samename.
ParseCallbacks::generated_name_override
method now receivesItemInfo<'_>
asargument instead of a
&str
.clang-sys
crate version to 1.4.0 to support clang 15.void
.clap
dependency forbindgen-cli
to 4.bindgen-cli
argument parser which could introduce unexpectedbehavior changes.
ParseCallbacks::add_derives
method now receivesDeriveInfo<'_>
asargument instead of a
&str
. This type also includes the kind of target type.v0.63.0
Compare Source
Added
process_comments
method to theParseCallbacks
trait tohandle source code comments.
Changed
--wrap_unsafe_ops
option is enabled.
name: &str
argument forParseCallbacks::add_derives
byinfo: DeriveInfo
.1.30
are being deprecated andwill be removed in the future. If you have a good reason to use any of these
targets, please report it in the issue tracker.
Removed
removed:
whitelist_recursively
,hide_type
,blacklist_type
,blacklist_function
,blacklist_item
,whitelisted_type
,whitelist_type
,whitelist_function
,whitelisted_function
,whitelist_var
,whitelisted_var
,unstable_rust
.v0.62.0
Compare Source
Added
--override-abi
flag to override the ABI used by functionsmatching a regular expression.
C-unwind
ABI in--override-abi
on nightlyrust.
Changed
a|b
) is handled correctly butwildcard patterns (
*
) are now considered invalid. The.*
pattern can beused as a replacement.
ParseCallbacks
trait does not require to implementUnwindSafe
.Builder::parse_callbacks
method no longer overwrites previously addedcallbacks and composes them in a last-to-first manner.
is wrapped in unsafe blocks now.
Fixed
v0.61.0
Compare Source
Released 2022/10/16
Added
--sort-semantically
flag to sort the output in a predefinedmanner (#1743).
Bindgen::emit_warnings
method to emit warnings to stderr inbuild scripts.
--newtype-global-enum
flag to generate enum variants asglobal constants.
--default-non-copy-union-style
flag to set the default styleof code used to generate unions with non-
Copy
members.--bindgen-wrapper-union
flag to mark any union that matches aregex and has a non-Copy member to use a bindgen-generated wrapper for its
fields.
--manually-drop-union
flag to mark any union that matches aregex and has a non-
Copy
member to useManuallyDrop
.--merge-extern-blocks
flag to merge severalextern
blocksthat have the same ABI.
--no-size_t-is-usize
flag to not bindsize_t
asusize
.Builder
implementsClone
.Changed
--enable-function-attribute-detection
flag is also used to detectdiverging functions so the generated bindings use
!
as the return type.--size_t-is-usize
flag is enabled by default.<stdint.h>
types are no longer emitted.blocklist
options now can be used to block objective-C methods.core::ffi
module is used the sized raw integer typesinstead of
std::os::raw
if the Rust target version is1.64
or higher andthe
--use-core
flag is enabled.bindgen
CLI utility must be installed usingcargo install bindgen-cli
now.bindgen
as a library no longer pulls clap and any other CLIrelated dependencies.
Fixed
v0.60.1
Compare Source
Released 2022/06/06
Fixed
v0.60.0
Compare Source
Released 2022/06/05
Added
Debug
andCopy
to support C and Objective-C structs. (#2176)--version --verbose
now prints clang version (#2140).--allowlist-file
option (#2122).Fixed
#[macro_use]
use. (#2176)BINDGEN_EXTRA_CLANG_ARGS
is respected on the CLI now (#1723).#[must_use]
in typedefs (#2206).Changed
Removed
v0.59.2
Compare Source
Released 2021/11/26
v0.59.1
Compare Source
Released 2021/07/26
Fixed
v0.59.0
Compare Source
Released 2021/07/20
Added
Fixed
Changed
v0.58.1
Compare Source
Released 2021/04/06
Added
bindgen::Builder::whitelist_recursively
(deprecated in favor ofbindgen::Builder::allowlist_recursively
). [#2022][]v0.58.0
Compare Source
Released 2021/04/03
Added
[#2004][]
[#2013][]
Fixed
bindings more portable where unions could return garbage data (#1984)
Changed
Deprecated
bindgen::Builder::whitelist_type
is deprecated in favor ofbindgen::Builder::allowlist_type
. [#1812][]bindgen::Builder::whitelist_function
is deprecated in favor ofbindgen::Builder::allowlist_function
. [#1812][]bindgen::Builder::whitelist_var
is deprecated in favor ofbindgen::Builder::allowlist_var
. [#1812][]--whitelist-type
is deprecated in favor of--allowlist-type
. [#1812][]--whitelist-function
is deprecated in favor of--allowlist-function
. [#1812][]--whitelist-var
is deprecated in favor of--allowlist-var
. [#1812][]bindgen::Builder::blacklist_type
is deprecated in favor ofbindgen::Builder::blocklist_type
. [#1812][]bindgen::Builder::blacklist_function
is deprecated in favor ofbindgen::Builder::blocklist_function
. [#1812][]bindgen::Builder::blacklist_item
is deprecated in favor ofbindgen::Builder::blocklist_item
. [#1812][]--blacklist-type
is deprecated in favor of--blocklist-type
. [#1812][]--blacklist-function
is deprecated in favor of--blocklist-function
. [#1812][]--blacklist-item
is deprecated in favor of--blocklist-item
. [#1812][]Removed
Fixed
Security
v0.57.0
Compare Source
Released 2021/02/01
Added
Fixed
v0.56.0
Compare Source
Released 2020/11/26
Added
From<ChildClass> for ParentClass
as well asTryFrom<ParentClass> for ChildClass
(#1883).dynamic_library_name
(#1846).Default
on a per-struct basis (#1930).Changed
(#1891).
Fixed
v0.55.1
Compare Source
Released 2020/08/24.
Fixed
generate valid Rust code. (#1882).
v0.55.0
Compare Source
Released 2020/08/23.
Removed
Added
Added options to avoid deriving the Debug trait (#1858).
Added options to allow to override the default anonymous field prefix (#1859).
Added options to allow to override the default macro integer type from the
command line (#1863).
Changed
Typed anonymous enums now generate better code (#1850).
Objective-C bindings are more idiomatic now (#1847).
Updated to clang-sys 1.0. Minimum supported rust version is 1.40 as
a consequence of that change.
Fixed
Fixed constness of multi-dimensional arrays in some cases (#1861).
Fixed wrong target given to clang when compiling with a target which doesn't
match the target clang expects (#1870, #1878).
Fixed wrong flags being computed for cross-compilation cases where the target
wasn't explicitly provided via clang flags (#1872).
Thanks again to all the awesome contributors that sent patches included in this
release!
v0.54.1
Compare Source
Released 2020/07/06.
Yanked: The change in #1798 is technically breaking, see PR for details.
Added
Added ParseCallbacks::func_macro to be able to process function-like macros.
(#1792).
Allowed IntKind::Custom to represent paths instead of idents (#1800).
Changed
Generated comment now includes the bindgen version, and can be disabled
(#1814).
Various documentation improvements.
Fixed
Typedefs for types with the same names as rust primitive types compiles
(#1798).
Bindgen dependencies will now get rebuilt when various environment variables
that affect bindgen change (#1809, #1813).
Various fixes to command_line_flags (#1816, #1819, #1821).
Functions that start with
operator
now get properly generated (#1817).Thanks to all the awesome contributors that sent patches included in this
release!
v0.54.0
Compare Source
Released 2020/05/21.
Added
Changed
Fixed
__stdcall
(#1781).v0.53.3
Compare Source
Released 2020/05/21.
Note: This release contains the same fixes and additions as 0.54.0, but without
the Objective-C breaking changes
Added
Fixed
__stdcall
(#1781).v0.53.2
Compare Source
Released 2020/03/10.
Changed
v0.53.1
Compare Source
Released 2020/02/03.
Added
v0.53.0
Compare Source
Released 2020/02/02.
Added
Changed
Fixed
v0.52.0
Compare Source
Released 2019/11/19.
Added
newtype
enum style, much likebitfield
but without the bitwise ops(#1677).
MaybeUninit
rather thanmem::uninitialized()
(#1666).default-features = false
, you probably want to use the"runtime"
featureto get the same behavior as before.
Changed
regex
unicodefeatures).
Fixed
#[must_use]
support for libclang 9+ (#1646).BitfieldUnit
constructor to handle 64 bit wide bitfields on 32 bit (#1640).ParseCallbacks
handler for included files. (#1637).v0.51.1
Compare Source
Released 2019/09/23.
Fixed
Ord
andPartialOrd
implementations were fixed, which regressesbindgen in funny ways when using rustc nightly. Dot releases for a few of the
previous versions of bindgen will be created with this fix. Also,
a
v0.51.1-oldsyn
version was uploaded without the syn update. #1627Changed
Syn and related dependencies have been updated. #1611
Switches added to allow less dependencies. In
particular: It won't pull
failure
and related dependencies by default, andthere's a default-on
which-rustfmt
feature which allows to get rid ofwhich
altogether. #1615 / #1625fxhash
dependency was switched torustc-hash
. #1626v0.51.0
Compare Source
Released 2019/07/26.
Fixed
Improve workaround for LLVM stack overflow when evaluating value-dependent
expressions. #1591
Bindgen will properly detect the layout of incomplete arrays. #1592
Bindgen will properly detect the layout of empty unions and forward
declarations of unions. #1593 and #1595. Thanks @pmarks!
Changed
wchar_t
is computed. This is a breaking changesince
IntKind::WChar
(exposed inParseCallbacks
) no longer needs asize
member. #1596
Added
RUSTFMT
in the environment to try to find a suitablerustfmt
binary. #1602v0.50.1
Compare Source
v0.50.0
Compare Source
Released 2019/07/01.
Added
Fixed pointers to Objective C blocks #1582.
Various bindgen auto-generated types are now constructible in
const fn
contexts #1571
It is possible to generate
#[non_exhaustive]
enums for rust nightly targets.#1575
It is possible to avoid building clap now if you're using bindgen as
a library. #1581.
v0.49.4
Compare Source
v0.49.3
Compare Source
Released 2019/06/25. YANKED
Added
Various bindgen auto-generated types are now constructible in
const fn
contexts #1571
It is possible to generate
#[non_exhaustive]
enums for rust nightly targets.#1575
It is possible to avoid building clap now if you're using bindgen as
a library. #1581.
v0.49.2
Compare Source
Released 2019/05/22
Changed
not to the element (so
void foo(int arr[2])
would be generated asarr: *mut [c_int; 2]
rather thanarr: *mut c_int
. Thanks @elichai!#1564.
v0.49.1
Compare Source
Released 2019/05/16
Fixed
#[link_name]
attributes in win32 and macos forC functions and constants where it can detect it's not needed (thanks
@michaelwoerister!). #1558
Changed
hashbrown
internally, and will use fxhashand
std::HashMap
. This is equivalent for newerrustc
s sincehashbrown
was merged in libstd, and the performance difference should be close to zero
for older rustcs.
v0.49.0
Compare Source
Released 2019/03/27
Added
Fixed
declarations (thanks @flowbish!). #1535
Changed
--target
isspecified. The
detect_include_paths
option can be used to opt-out of thisbehavior.
v0.48.1
Compare Source
Released 2019/03/06
Fixed
v0.48.0
Compare Source
Released 2019/03/04
Changed
more often the layout of structs right. #1529
Fixed
v0.47.4
Compare Source
Released 2020/11/13
Added
v0.47.3
Compare Source
Released 2019/02/25
Changed
v0.47.2
Compare Source
Released 2019/02/22
Fixed
Configuration
📅 Schedule: Branch creation - "before 3am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.