Changelog:
* 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)
Changelog:
* Allow to override the mangling separator (#502)
* cbindgen now handles better having ZSTs in template parameters, and
default template parameters (#563).
* Support for annotating nonnull pointers (#558)
* Fixed bitflags that overflow a signed integer (#556)
* Support for wildcard argument names (#550)
* Support for the never return type, with configurable annotation (#549)
* Properly reject arrays as function arguments (#540)
The intent of "--frozen --locked" was to not use the network, but the new
"--offline" option is better suited for this purpose.
It for example allows us to patch Cargo.toml if necessary without having
to regen checksums.
* Introduce cbindgen:ignore comment annotation, to allow ignoring items or modules. (#519)
* Support for casts in constant expressions. (#526)
* Make a non-fatal error a warning message. (#535)
* Add a --metadata option to the CLI, to allow passing pre-computed cargo metadata. (#538)
This allows rust-bin and rust to coexist in bulk builds (for testing, etc),
but the packages still may not be installed at the same time.
rust.mk as a solution for picking the correct rust variant was suggested
by gdt@. It is intended to be included directly by packages that do not
use cargo.mk, and indirectly by packages that do use cargo.mk.
rust.mk provides one user-settable variable:
RUST_TYPE
as before, whether to bootstrap rust from source or use
official binaries. may be "src" or "bin"
And two package-settable variables:
RUST_REQ
the minimum version of Rust required by the package.
defaults to "1.20.0"
RUST_RUNTIME
whether Rust is a runtime dependency, may be "yes" or "no"
Changelog:
0.14.2
* Fixed minimal dependency versions. (#507)
* Add an option to write pragma once. (#511)
* Fix submodule scanning for implicit Rust 2018 modules. (#512)
* Fix dependency parsing / scanning to handle target-specific versions. (#513)
* Use heck for case conversion. (#514)
* Add support for verbatim content after includes. (#416)
* Allow to add attributes to most generated functions. (#515)
0.14.1
* Handle mangling pointers. (#508)
* Unconditionally generate a return statement in partialeq implementations. (#509)
0.14.0
* Minor tweak at how [export.exclude] is handled to allow excluding
generic instantiations in C mode. (#501)
* Documented cpp_compat option. (#496)
* Fixed a panic when parsing associated constants for a built-in type. (#494)
0.13.2
* Constants now have suitable documentation. (#471)
* Fixed some C warnings by emitting void when there are no arguments. (#470)
* Avoids reading cargo.toml when not needed, which can cause panics in workspace situations.
* Only write `default` cases if the switch is not exhaustive. (#475)
* Some warnings have been refined. (#477)
* Code generation for static arrays has been fixed. (#479)
* Opt-in support for constexpr in constants. (#481)
* Fix C code generation and some warnings when extremely large constants are used. (#490)
* Proper escaping of enum variants and fields. (#483)
* Added support for RefCell (as an opaque type) and Cell. (#489)
5a4d74b
ir: escape export_name while writing source of EnumVariant
Changelog:
0.13.1
* Support #[cfg] on individual enum variants. (#469)
0.13.0
* Support 'swift_name' attributes on generated functions (#449)
* Add [export.pre_body] to config (#452)
* Handle new line in doc attribute (#454)
* Add support for `Self` in tagged enums, structs and unions (#455, #455, #456)
* Make sentinel variant respect regular config (#459)
* Fix layout of tagged enums with size under some configurations (#463)
* Add an option to allow configuring the order of function names in generated headers (#466)
0.12.2
Not available
I am under the impression we use _THING to mean "defined by the
implementation", which would be similar to the C meaning of __ prefix,
rather than "private to this file".
0.8.4
* Support for package renaming in Cargo.toml
* Improved error messages for |cargo metadata| failures
* Replaced 'test.py' harness with |cargo test|
* Char constants will now be escaped properly
* Visibility of constants will now be respected
* Added a C99 doc comment style
0.8.3
Changes not found.
Also upgrade the various rust crates according to new requirements.
Sadly, no change log available upstream that I can find...
(The old version uses an old libc crate, which hasn't been adapted
for NetBSD/aarch64.)
This project can be used to generate C bindings for Rust code. It
is currently being developed to support creating bindings for
WebRender, but has been designed to support any project.
cbindgen-0.6.7 is not compatible with www/firefox-63.0.1.