While the Cargo.lock has 1.0.89, the current minimal version in Cargo.toml
is 1.0.3, which cannot parse modern Rust code. This leads to some
downstreams (*cough* Debian) inadvertently building cbindgen against
older versions of syn and the resulting cbindgen, even if it is the last
version, not being able to parse recent Rust code.
Bumping the version in Cargo.toml alleviates this to some extent. A
quick scan of the syn logs suggests 1.0.88 is the last version where
parsing support relevant to stable Rust syntax was added.
The common `tag` should already be enough, al other tags are identical to it.
In Cython case they only create noise because the declarations only introduce names and do not determine layouts.
* Update MSRV to 1.54.0
* Update clap to 3.1.
* Update heck to 0.4.0
* unraw identifiers
* Honor documentation_length in Cython.
* Add documentation_style to with short and full options
* Map RawFd to Int
* Respect remove_underscores config when prefixing name to enum
cbindgen invokes `cargo metadata` to find the sources of dependencies so
that it can generate bindings for types that originate in those
dependencies. However, `cargo metadata` defaults to fetching
dependencies for _all_ platforms unless it is specifically invoked with
the `--filter-platforms` argument.
This PR makes cbindgen pass that argument to `cargo metadata` using the
host platform, which will significantly reduce the time of the first
call in cases where the dependency tree includes many target-specific
dependencies.
Fixes#675.
* Simplify types in generics (#663)
* Use --profile=check for macro expansion (#671)
* Use exported name to prefix enum variants (#672)
* Fix path attribute handling in inline submodules (#679)
* Fix a stack overflow with some recursive typedefs (#680)
As seen in hashbrown:
#[cfg(feature = "raw")]
/// Experimental and unsafe `RawTable` API. This module is only available if the
/// `raw` feature is enabled.
pub mod raw {
// The RawTable API is still experimental and is not properly documented yet.
#[allow(missing_docs)]
#[path = "mod.rs"]
mod inner;
pub use inner::*;
#[cfg(feature = "rayon")]
pub mod rayon {
pub use crate::external_trait_impls::rayon::raw::*;
}
}
This should be backwards-compatible in practice since `IdentifierType`
is `Copy`. In theory it's not though, as someone _might_ be passing that
function by name to something that requires that exact signature.
This was an oversight in 1903686f9eb09f587885d579f3e14c990e799938
because the code I grabbed to visit the generics was dealing with them
somewhere else.
* Add with_parse_extra_bindings to builder. (#645)
* Support NonZero and fix incorrect simplification of Option<ptr> into ptr. (#647)
* Deal with name conflicts correctly in declaration type resolution. (#651)
* Support pointers to ZSTs. (#656)