Wei Zhang
52a65e5be3
docs: update version to 0.24.0
...
Signed-off-by: Wei Zhang <kweizh@gmail.com>
2023-03-29 22:24:27 +02:00
novafacing
a2bda0a1de
Correct wrong property in docs toml example
2022-10-17 19:31:19 +02:00
Emilio Cobos Álvarez
305ccfe746
constant: Make const.allow_constexpr default to true.
2022-04-21 18:48:00 +02:00
Stovent
8cfd4570cc
Fix #753
2022-04-21 13:03:21 +02:00
Chris Cleveland
b94318a8b7
Update docs.md
2022-01-09 05:12:50 +01:00
Sean McArthur
0e3f9bd9cb
Add documentation_style to with short and full options
2021-11-02 11:13:49 +01:00
Marc-André Lureau
24c130bd9c
Map RawFd to Int
...
On all Unix systems, RawFd is defined as c_int.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-11-02 11:09:22 +01:00
Jan-Erik Rediger
6c96c8ab95
Update --pretty=expanded to -Zunpretty=expanded
...
`--pretty` is gone as of https://github.com/rust-lang/rust/pull/83491
2021-07-28 11:52:29 +02:00
Kendall Koning
63c1043dfb
Simplify Pin<T> to T
...
cbindgen already simplifies `MaybeUninit<T>` and `ManuallyDrop<T>` to `T`. This adds `Pin<T>` as well.
2021-06-19 20:48:57 +02:00
Kendall Koning
4e394493d6
Ignore PhantomPinned
...
cbindgen already ignores `PhantomData`. It should ignore
`PhantomPinned` for the same reasons.
Closes #695
Fixes #694
2021-06-19 10:35:08 +02:00
Ivan Enderlin
d3cd22bc6f
doc: Document the documentation
config entry.
2021-02-01 13:53:02 +01:00
Vadim Petrochenkov
b0aae44c77
Add two Cython-specific options to the config
2020-11-25 17:33:38 +01:00
Vadim Petrochenkov
51405d1277
Support generation of Cython bindings
2020-11-17 15:27:34 +01:00
Vadim Petrochenkov
94e9b3111f
Use a getter for accessing Config::cpp_compat
2020-10-31 17:00:57 +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
aeb69bcc69
Switch default sorting order for items to "None"
2020-10-05 19:57:33 +02: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
Luni-4
fe656442a5
Document ptrs-as-arrays annotation
2020-09-07 20:53:09 +02:00
Nick Wilcox
6fc7c77b0f
remove duplicated code, correct test names, change config param
2020-08-05 15:09:28 +02:00
Nick Wilcox
41b7866c14
Add support for an optional attribute on pointers whose nullability can be inferred from the Rust type.
2020-08-05 15:09:28 +02:00
Emilio Cobos Álvarez
8eeb0bb6ec
docs: document the function.no_return option.
2020-07-24 22:42:20 +02:00
James A. Gill
d747939e18
Add instructions for C language switch
...
The default instructions produce C++ headers that are incompatible with
C. This makes it explicit what the default command does, and the switch
needed to produce C headers.
2020-05-26 23:18:16 +02:00
Emilio Cobos Álvarez
b04aa7e699
parser: Introduce cbindgen:ignore comment annotation, to allow ignoring items or modules.
2020-05-15 15:43:54 +02:00
Emilio Cobos Álvarez
5ee5b3ee88
ir: Allow per-method annotations for all the auto-generated struct and enum methods.
2020-05-01 00:30:40 +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
Evgeniy Reizner
6fd245096d
Add missing cpp_compat documentation.
2020-03-23 10:54:49 +01:00
AlaskanEmily
462871695d
Add option to output constexpr generated constant primitive values
...
This is controlled by the [const] allow_constexpr option, similar to the
allow_static_const option.
It's only applied to primitives currently.
2020-03-03 20:46:12 +01:00
Andreas Dinter
f5edc2c2ab
Document usage of 'sort_by' option
2020-01-27 16:03:12 +01:00
Elliott Mahler
5b227c1062
Add [export.pre_body] to config ( #452 )
2020-01-13 14:26:21 +01:00
Alastair Daivis
cf406e9640
Support 'swift_name' attributes on generated functions
...
Fixes #420
2020-01-12 16:18:17 +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
Emilio Cobos Álvarez
48f1038918
enum: Add an option to generate copy-assignments.
...
And recommend its usage if copy-constructors are being generated, as otherwise
C++ in its whole glory would do a bitwise copy, which is not really what you
want if you have constructors / destructors around.
2019-12-16 13:20:02 +01:00
Aleksa Sarai
2b2ab904cc
docs: add documentation for new alignment config knobs
...
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2019-12-15 11:52:23 +01:00
Emilio Cobos Álvarez
9b7bb8f1b6
Update docs to account for the latest char => char32_t change.
2019-12-04 00:58:54 +01:00
Adrian Wong
9b1fd8ecca
Fix missing C header for char32_t
2019-12-02 19:55:04 +01:00
Daisuke Kato
1765130a60
remove unnecesary "`" from docs.md
2019-10-20 14:44:29 +02:00
Adrian Wong
087d36f32a
Map char to char32_t
...
Rust's `char` is 32 bits wide, but `wchar_t` on Windows is 16.
Avoid truncation by mapping `char` to `char32_t`.
2019-10-04 10:39:31 +02: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
yelite
65fbb25638
Fix typo in docs
2019-08-03 17:37:55 +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
Alexis Beingessner
b1de604581
Add comprehensive user docs, smooth out README
2019-06-11 18:23:54 -05:00