If there's already a release build, it's better for cbindgen to reuse
the build artifacts from that to expand macros rather than starting
from scratch with a debug build. Controlled with
--profile (debug|release)
as well as parse.expand.profile in cbindgen.toml, though hardcoding a
profile in a config file seems unlikely.
While useful sometimes, it doesn't have stability guarantees (so CI can
break when new rust stable versions are released), and it can do
suggestions that make us require newer rustc versions than needed, which
is not ideal.
* Allow customizing mangling of generic parameters in C (#575)
* Box<T> simplifies to T* in C (4ce324c)
* ManuallyDrop<T> and MaubeUninit<T> simplify to T in C, and are opaque in C++ (0076a17)
* C++ supports a derive-ostream annotation to derive serialization of structs, unions and enums (#582)
* Large character constants have been fixed on Windows (#586)
* Constants are now generated for typedefs, etc (#589)
* The `sort_by` configuration option has been made to work for constants (#587)
* Default sort order is source order now (sort_by = "None"), and can be changed by the above option (#587)
This happens when the tags are separated. In this case the output is slightly
different since the tag is not part of the struct body, so we need the top-level
serializer to write the tag type.
Ideally we'd just do this when we need it, but the ostream derivation
will be controlled by both global config and per-structure config, so
it's hard to know exactly when we need it and when we don't.
Following the example of `.skip_warning_as_error`, this patch
introduces a `.skip_cpp` suffix to skip the generation of `.cpp`
files.
This patch also simplifies the code. Ideally, we would create and
implement a new trait offering an API like `is_cpp_skipped`,
`is_warning_as_error_skipped`, and `normalize` (to remove all
suffixes), but it's a little bit overkill for our needs right now.
Option<RenameRule> doesn't make sense anywhere because there's a
RenameRule::None itself, which is also default.
This simplifies a bit the rename rules code, and removes one weird
"default-to-gecko-case" that seems snuck by.