21 Commits

Author SHA1 Message Date
Alex Touchet
35f2e44ef2 Update URLs 2023-09-09 00:54:28 +02:00
sevenc-nanashi
0fb5d07ae4
Add support for #[deprecated].
Closes #875.
Closes #860.
Closes #408.
2023-09-04 20:18:44 +02:00
Sean McArthur
0e3f9bd9cb Add documentation_style to with short and full options 2021-11-02 11:13:49 +01:00
Ivan Enderlin
d3cd22bc6f doc: Document the documentation config entry. 2021-02-01 13:53:02 +01:00
Emilio Cobos Álvarez
4e578fb2da
Fix typo in config option.
Fixes #641.
2021-01-04 15:41:50 +01:00
Vadim Petrochenkov
398b28ca30 Add an option for converting usize/isize into size_t/ptrdiff_t 2020-10-27 11:34:27 +01:00
Vadim Petrochenkov
f3d5a20363 Support sort_by for constants
Also support a global default for `sort_by` affecting both functions and constants.
2020-10-05 19:57:33 +02:00
Emilio Cobos Álvarez
18110669fc Add docs, move mangling configuration to its own place, add integration tests. 2020-09-22 12:54:55 +02:00
Tom Solberg
3ca0e75ed9
Add support for specifying line ending style (#568) 2020-08-26 15:28:17 +02:00
Emilio Cobos Álvarez
8eeb0bb6ec
docs: document the function.no_return option. 2020-07-24 22:42:20 +02:00
Luca Barbato
1a824c04f2 Add support for verbatim content after includes
Let the user add raw C code in the generated header after the include
blocks.

It matches what bindgen provides with the raw_lines option.
2020-04-22 01:50:16 +02:00
Igor Sadchenko
275b36fb09 Added pragma once option. Issue #510 2020-04-14 19:03:55 +02:00
Emilio Cobos Álvarez
910e1ee88f
template: Add allow_constexpr to template.toml. 2020-03-03 21:15:27 +01:00
Andreas Dinter
f5edc2c2ab Document usage of 'sort_by' option 2020-01-27 16:03:12 +01:00
Evan Shaw
6a9066f7cd Add enum_class option
This option allows specifying that a C++ enum should be emitted with
plain `enum` rather than `enum class`. It's true that `enum class` should
generally be preferred, but sometimes there's existing code which is
already using plain `enum`, and porting that code to Rust becomes easier when
`cbindgen` can emit plain `enum`.

This option can be overridden on a per-enum basis using a `cbindgen:` annotation.

It defaults to true for two reasons:

* Backward compatibility.
* `enum class` is probably actually what you want, in general.
2019-12-29 12:55:59 +01:00
Rasmus Eneman
89e1d970b0 Add using_namespaces to documentation 2019-09-02 21:50:10 +02:00
Emilio Cobos Álvarez
b2efcc4051 ir: Add an option to generate an empty, default constructor for tagged enums.
This allows to clean up a pattern that has been showing up lately, see
occurrences of:

  https://searchfox.org/mozilla-central/rev/9775cca0a10a9b5c5f4e15c8f7b3eff5bf91bbd0/servo/ports/geckolib/cbindgen.toml#329
2019-08-25 17:05:22 +02:00
Emilio Cobos Álvarez
5f8e027290
rename to extra_bindings per IRC discussion. 2019-06-25 21:33:19 +02:00
Emilio Cobos Álvarez
16b2a25442
Turn the option into a whitelist rather than an on / off switch. 2019-06-25 21:28:12 +02:00
Emilio Cobos Álvarez
0bcd54f9c3
Add an option to generate consts / globals / fn from parsed dependencies.
This is a limitation that may not be useful if you're using it to parse known
dependencies.
2019-06-25 21:28:11 +02:00
Alexis Beingessner
371c0ec277 add template cbindgen.toml 2019-06-11 19:44:27 -04:00