summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-08Update cexpr dependencyIlia Kravets
2019-11-03Do not generate implementation for clone for FAMDavid Frey
Flexible array members are represented in the generated binding by a struct __IncompleteArrayField<T>. Since such members do not contain any information about how big they are, it is impossible to automatically clone or copy them, either in C or rust. Fixes #1431.
2019-10-28Move rust feature docs into a more useful place.Emilio Cobos Álvarez
2019-10-27Turn off regex default features.Danny Bautista
2019-10-26[book] Update most recent version of bindgenRobbie Harwood
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
2019-10-22Add `disable_nested_struct_naming` option (#1610)oblique
The following structs have different names for C and C++. In case of C they are visible as `foo` and `bar`. In case of C++ they are visible as `foo` and `foo::bar`. By default bindgen follows C++ naming to avoid generating duplicate names. With this option the following structs will be named as `foo` and `bar` instead of `foo` and `foo_bar`. ``` struct foo { struct bar { } b; }; ``` In case of an unnamed definition we build the canonical name from the inner most named definition. For example the following will generate `baz__bindgen_ty_1`: ``` struct foo { struct bar { struct baz { struct { } u; } z; } b; }; ``` This option should be used only for C headers. It is needed in some rare situations where user used another code generator that already mangled nested definitions. A real life example is [asn1c] with `-fcompound-names` option. [asn1c]: https://github.com/vlm/asn1c
2019-10-22codegen: Handle opaque aliases to enums correctly.Emilio Cobos Álvarez
Opaque types don't use the path to their aliased type but an opaque type like an array or primitive with the right alignment. Fixes #1599.
2019-10-21Test the runtime feature and the non-static linking.Emilio Cobos Álvarez
We can't test the "static" code-path, since there are no prebuilt binaries in releases.llvm.org.
2019-10-21Cargo fmt.Emilio Cobos Álvarez
2019-10-21Allow static and dynamic linkingJeremy Fitzhardinge
Currently bindgen always uses clang-sys with the "runtime" feature - that is, load libclang at runtime with dlopen (or similar) at runtime. This PR keeps this default, but also - adds "static" to statically link libclang - without either "runtime" or "static", link with the shared library Many distributions don't ship with a static libclang, but linking with the dynamic library will use normal ld.so mechanisms to define where the .so file should be found. (Ditto for the Mac and Windows equivalents.)
2019-10-14Rustfmt to account for rebase.Emilio Cobos Álvarez
2019-10-14Fix bitfield-linux-32.hpp to not hit #1538.Emilio Cobos Álvarez
The test was failing.
2019-10-14bindgen-integration: Reformat crate too.Emilio Cobos Álvarez
Cleanup a bit the reformatted bits while at it.
2019-10-14tests: Remove support for test directive that is no longer used.Emilio Cobos Álvarez
ae0fdf7a5519a175d887389c80399234637bdc29 changed the setup for the only test that actually used this.
2019-10-14Enforce rustfmt on automation.Emilio Cobos Álvarez
2019-10-14Run `cargo fmt` on the main crate.Emilio Cobos Álvarez
2019-10-14tests: Reformat test crate.Emilio Cobos Álvarez
Now that the rustfmt configuration is different we need to do this to not generate unexpected failures.
2019-10-14tests: Use the same rustfmt configuration as the parent directory.Emilio Cobos Álvarez
This allows us to workaround/fix https://github.com/rust-lang/rustfmt/issues/3799
2019-10-14tests: Fix some warning in the test crate.Emilio Cobos Álvarez
2019-10-14Add llvm 9.0 to CI.Emilio Cobos Álvarez
2019-10-14Update test expectations for libclang 9.0.Emilio Cobos Álvarez
2019-10-14Create clang-9-specific test directory, as a copy of clang-5.Emilio Cobos Álvarez
2019-10-14tests: Look at expectations/tests/libclang-9 expectations.Emilio Cobos Álvarez
2019-10-14tests: Look at the more specific tests first, but don't require specific ↵Emilio Cobos Álvarez
expectations for all llvm versions.
2019-10-14function: Fix #[must_use] support in libclang 9+.Emilio Cobos Álvarez
2019-10-14features: core::ffi::c_void isn't really available before 1.30.Emilio Cobos Álvarez
2019-10-08Fix BitfieldUnit constructor to handle 64 bit wide bitfields on 32 bit.Cameron McCormack
Fixes #1639.
2019-10-08Rename Item::canonical_name_cache for consistency.Cameron McCormack
2019-10-08Use a LazyCell for Item::canonical_name_cache and Item::local_id.Cameron McCormack
It's slightly neater.
2019-10-08Cache the result of Item::path_for_whitelisting.Cameron McCormack
2019-10-08Add ParseCallbacks handler for included fileschrysn
As the clang_File_tryGetRealPathName function is only exposed by clang_sys for clang >= 7.0, this raises the clang dependency. Closes: https://github.com/rust-lang/rust-bindgen/issues/1635 The book example code for creating a builder to run inside Cargo is extended by using the rereun-if-changed headers.
2019-10-08Don't always output translation_unit timer.Cameron McCormack
2019-10-04Update env_logger and run a full cargo updateBastien Orivel
2019-10-04Build the rustified_non_exhaustive_enums RegexSet.Cameron McCormack
2019-10-04Add a couple more timers.Cameron McCormack
For the remaining named parts of Context::gen.
2019-10-03Use c_void from core when --use-core is specifiedKyle Tomsic
`c_void` is available as `::std::os::raw::c_void` and `::core::ffi::c_void`. If the "--use-core" option is specified (but no --ctypes-prefix is provided), we should emit `::core::ffi::c_void` rather than the `std` one.
2019-09-28Fallback: call "rustfmt" directly without whichheidezomp
If the `which-rustfmt` feature isn't enabled, assume that the binary is called "rustfmt" and that it is in the user's PATH, instead of returning an error.
2019-09-24Mention v0.51.1-oldsyn.Emilio Cobos Álvarez
2019-09-23Fix changelog links.Emilio Cobos Álvarez
2019-09-23Release v0.51.1v0.51.1Emilio Cobos Álvarez
(Cargo.toml file was updated already in the syn update)
2019-09-23ir: Make Ord and PartialOrd implementations agree.Emilio Cobos Álvarez
See https://github.com/rust-lang/rust/issues/64710. Bogus implementations were introduced in 230545e7c, d3e39dc62, and 379bb1663.
2019-09-23Upgrade 'which' to remove indirect dependency on 'failure'.Adrien Prokopowicz
2019-09-23fxhash -> rustc-hashEvgeniy A. Dushistov
fixes #1616
2019-09-20Update Debian requirements.Emilio Cobos Álvarez
Closes #1613
2019-09-17Improve the script to enforce rustfmt on automation.Emilio Cobos Álvarez
2019-09-17Rustfmt.Emilio Cobos Álvarez
2019-09-17Add rustfmt to nightly toolchainRyan Lopopolo
2019-09-17Set RUSTFMT for nofeatures testsRyan Lopopolo
2019-09-17lint ci/script.shRyan Lopopolo
2019-09-17Test bindgen with no default featuresRyan Lopopolo