summaryrefslogtreecommitdiff
path: root/src/codegen/mod.rs
AgeCommit message (Collapse)Author
2020-08-15codegen: Simplify a bit the code in #1847Emilio Cobos Álvarez
2020-08-15Added Bindgen names to objective-c pointer return typesSebastian Imlay
* Took advantage of the repr transparent to use Bindgen return type names. * Updated unit tests and book
2020-08-09Add --default-macro-constant-typeChih-Hung Hsieh
* --default-macro-constant-type could be 'signed' or 'unsigned' * Its default value is 'unsigned' to use u32/u64 for C macro constants that fit into the u32/u64 ranges. * For old C libraries that use macros as int/long parameter and/or return value types, their macros are better declared as i32/i64 if the values fit the i32/i64 ranges, to be compatible with c_int/c_long types. They can use "--default-macro-constant-type signed"
2020-08-03codegen: Use shorthand initialization in EnumBuilder.Emilio Cobos Álvarez
This was introduced in #1850.
2020-08-03Add --no-debug <regex> flagVarphone Wong
2020-08-03Improves bindings for typed and anonymous enumsCameron Mulhern
2020-07-21Change non-fatal errors to warningsleo60228
2020-06-15Permit IntKind::Custom to represent Paths instead of just IdentsAlan Egerton
2020-06-15Derive traits for newtype aliases (#1802)eggyal
2020-06-07Fix warning introduced in recent objective-c work.Emilio Cobos Álvarez
2020-05-11Added inheritance to objective-c support.Sebastian Imlay
2020-05-04Do not emit Rust method wrapper for blacklisted functionsStephen Crane
We should not emit Rust struct methods corresponding to a C++ method unless we are actually emitting a binding for that method.
2020-04-27Run `cargo fmt`Joshua Nelson
2020-04-27Run `cargo fix --edition`Joshua Nelson
2020-03-25Indicate undefined behaviour in enum docs and point to alternativeAphek
2020-03-16Added some initial constraints to the objective-c bindgen stuffSebastian Imlay
2020-02-03options: Add an opt-in to recover the size_t behavior removed in 5d38f2ac.Emilio Cobos Álvarez
2020-02-02ir: codegen: Handle too large bitfield units.Emilio Cobos Álvarez
By not generating various code for it. In the future, we could improve on this by splitting contiguous bitfield units, if needed, so that we can implement them without dealing with rust array derive limits. Fixes #1718
2020-01-05An initial implementation of objective-c generics for #1259 (#1702)simlay
2019-12-13Remove size_t to usize conversion ruleConor McAvity
2019-12-11codegen: Minor cleanup after #1691.Emilio Cobos Álvarez
2019-12-11Add support for wasm_import_moduleJasper-Bekkers
2019-11-28Fix warning on rustdocJake Merdich
Rustdoc was treating doc comments containing `#[non_exhaustive]` as links and warning, so mark that as code to avoid the warning.
2019-11-14Make rustfmt happyDavid Vo
2019-11-14Add newtype enum styleDavid Vo
This adds an enum style similar to the existing bitfield style, without the bitwise operator impls. Closes: #1669
2019-11-09Replace unsafe ref->ptr transmute with 'as' castingElichai Turkel
2019-11-08Option to use #[repr(transparent)] structs instead of type aliasing.Joseph Rafael Ferrer
2019-11-08Add support for MaybeUninitElichai Turkel
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-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-14Rustfmt to account for rebase.Emilio Cobos Álvarez
2019-10-08Fix BitfieldUnit constructor to handle 64 bit wide bitfields on 32 bit.Cameron McCormack
Fixes #1639.
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-17Rustfmt.Emilio Cobos Álvarez
2019-07-27Fix beta build warnings / errors. (#1603)Emilio Cobos Álvarez
Fixes #1598
2019-07-24Cleanup wchar_t layout computation to happen later. (#1596)Emilio Cobos Álvarez
This is a breaking cheange since WChar is exposed, but should be no behavior change otherwise.
2019-06-12Style fixes.uk
See https://github.com/rust-lang/rust-bindgen/pull/1575
2019-06-11Add rust target configuration for feature #1554uk
Will panic if the feature is being used outside nightly. See https://github.com/rust-lang/rust-bindgen/pull/1575#discussion_r292231027
2019-06-11Rename a couple miscalled identifiers.uk
See https://github.com/rust-lang/rust-bindgen/pull/1575
2019-06-10Add support for non_exhaustive rustified enums.uk
Implements the feature discussed in https://github.com/rust-lang/rust-bindgen/issues/1554.
2019-06-06For rust-target >= 1.30, make __IncompleteArrayField::new a const fnColin Wallace
2019-06-06For rust-target >= 1.30, make __BindgenUnionField::new a const fnColin Wallace
2019-06-06FIX #1571: For rust-target >= 1.30, make __BindgenBitfieldUnit::new a const fnColin Wallace
2019-05-22Added array pointers to the CLIElichai Turkel
2019-05-22Added array pointers codegenElichai Turkel
2019-05-21Update LinksAlex Touchet
2019-05-15Only emit #[link_name] attribute if necessary.Michael Woerister
2019-05-06Remove unused mut.Emilio Cobos Álvarez
2019-03-25ir: Whitelist items that don't generate code to improve derive behavior.Emilio Cobos Álvarez
When not whitelisting recursively. Fixes #1454
2019-03-21Unify derive logicJethro Beekman