Luni-4
73ea04c2b0
Add badge to README
2020-09-07 00:24:10 +02:00
Luni-4
6b56082be8
Replace travis with Github Actions
2020-09-07 00:24:10 +02:00
Luni-4
fec6bdad8c
Fix clippy warnings
2020-09-06 20:19:48 +02:00
Tom Solberg
3ca0e75ed9
Add support for specifying line ending style ( #568 )
2020-08-26 15:28:17 +02:00
Emilio Cobos Álvarez
83cdbd897f
Release v.0.14.4
2020-08-20 18:42:17 +02:00
Adam Wilson
030916e399
Add option for mangling_separator
in ExportConfig ( #502 )
2020-08-18 21:45:30 +02:00
Emilio Cobos Álvarez
d652d29ae2
ir: Be less strict when instantiating opaque types.
...
There are two situations where we can legitimately end up with a
different number of template params.
Fixes #532 .
Fixes #527 .
2020-08-15 13:40:54 +02:00
Emilio Cobos Álvarez
6b4181540c
config: Derive default where appropriate.
2020-08-05 17:39:30 +02:00
Emilio Cobos Álvarez
29bc8f45f6
ir: Represent references and const / mut ptrs using the same Type variant.
...
There should be no behavior change.
2020-08-05 17:39:30 +02:00
Nick Wilcox
afd4a05d4e
update nonnull expectations
2020-08-05 15:09:28 +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
3527e0f1e3
Update expectation files
2020-07-31 16:22:48 +02:00
Emilio Cobos Álvarez
f41eefba45
Add fix for failing scenario
...
This fixes the scenario by adding an explicit cast based on type
of the field.
Fixes #555
2020-07-31 16:22:48 +02:00
Kartikaya Gupta
977d95b0ff
Add failing scenario to test
...
A u32 bitflags structure should allow a 1<<31 value. However, with
current cbindgen this produces a compiler error with latest clang, because
1<<31 is treated as a signed value (-2147483648) which cannot be narrowed
back into a uint32_t without a cast.
2020-07-31 16:22:48 +02:00
Emilio Cobos Álvarez
6ba31b49f4
tests: Fix errors when testing with clang.
...
Fixes #554
2020-07-31 12:07:20 +02:00
Emilio Cobos Álvarez
3fe490324f
ci: Try to get tests green even when rust nightlies have no rustfmt.
2020-07-25 15:18:17 +02:00
Emilio Cobos Álvarez
fea6fdb516
function: Move function arguments into their own struct.
...
This will simplify potentially adding annotations for them in #545 .
2020-07-25 13:50:11 +02:00
Emilio Cobos Álvarez
5eae0bc07b
function: Add support for wildcards in arguments.
...
We don't support unnamed arguments, and we give a terrible error
("Parameter has an unsupported type.") when you use them.
They're very simple to implement so we should just do it.
2020-07-25 13:50:11 +02:00
Emilio Cobos Álvarez
8eeb0bb6ec
docs: document the function.no_return option.
2020-07-24 22:42:20 +02:00
mexus
a94d6e2c9b
Support "never" return type
2020-07-24 22:39:08 +02:00
Emilio Cobos Álvarez
9d7516ef1a
Do not accept array as function arguments ( #540 )
2020-07-14 19:15:00 +02:00
Luni-4
274c9743ca
Add tests
2020-07-14 16:59:54 +02:00
Luni-4
bf78df1996
Do not accept array as function arguments
2020-07-07 17:43:06 +02:00
Emilio Cobos Álvarez
cc2876f709
Release 0.14.3
2020-06-24 17:32:15 +02:00
Emilio Cobos Álvarez
ce28fd7c8a
main: Allow to pass a metadata file from the CLI.
2020-06-24 17:04:03 +02:00
Tom Hacohen
229b714511
README: add etesync-rs to the example usages
2020-06-12 19:53:33 +02:00
Jan-Erik Rediger
09e6549a61
Log non-fatal failure as a warning
2020-06-12 19:52:26 +02:00
Hayes Neuman
bb00d1c4a8
Support renaming for constants with casts, and properly order them in the output.
2020-05-26 23:21:28 +02:00
Hayes Neuman
967c378308
Support casts in constants
2020-05-26 23:21:28 +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
f75d65ccb8
parser: Factor out the "should skip parsing" test.
2020-05-15 15:43:54 +02:00
Emilio Cobos Álvarez
6323a5d981
parser: Unify a bit the attribute code.
2020-05-15 15:43:54 +02:00
Emilio Cobos Álvarez
8cb6e03cea
parser: Don't do two walks to collect nested modules.
...
This also centralizes the checks to ignore items (has_test_attr() at
the moment).
2020-05-15 15:43:54 +02:00
Emilio Cobos Álvarez
9516fe2b48
parser: de-duplicate code to process modules.
2020-05-15 15:43:54 +02:00
Emilio Cobos Álvarez
734b327616
parser: Clean up and deindent a bit the code to parse modules.
2020-05-15 15:43:54 +02:00
Igor Sadchenko
5c7a7fca42
Fixed link to wgpu project with cbindgen
2020-05-08 20:07:36 +02:00
Emilio Cobos Álvarez
b6b88f8c30
Release v0.14.2
2020-05-01 00:49:15 +02:00
Emilio Cobos Álvarez
a05a223704
tests: Add tests for attribute annotations.
2020-05-01 00:30:40 +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
Emilio Cobos Álvarez
be8e6ec876
enum: Allow to store annotations for empty variants.
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
Emilio Cobos Álvarez
d0d6716556
ir: Minor cleanup to the cfg code.
2020-04-21 19:54:07 +02:00
Vincent Tavernier
8139fbf3c7
Fix #418 : Use heck for case conversion
...
All case conversion cases seem to be covered by this crate so this
greatly simplifies `rename.rs`.
2020-04-21 19:50:26 +02:00
Emilio Cobos Álvarez
4beb526516
Fix #254 ( #512 )
...
By checking the recursion depth in the crate we are currently parsing,
we can decide on the right module directory to find submodules in. The
added `mod_2018` test fails without the changes to `parser.rs`.
If the current module is defined in a file called `mod.rs`, it is a 2015
edition module definition file, thus its module directory is the
directory containing the `mod.rs` file. Otherwise, it is a 2018 edition
or single-file module.
2020-04-21 17:30:19 +02:00
Vincent Tavernier
ca1c0b27b6
Run cargo-fmt
2020-04-17 14:29:22 +02:00
Vincent Tavernier
1df5129d1a
Fix 2015 edition module path resolution
...
If the current module is defined in a file called `mod.rs`, it is a 2015
edition module definition file, thus its module directory is the
directory containing the `mod.rs` file. Otherwise, it is a 2018 edition
or single-file module.
2020-04-17 14:22:00 +02:00
Vincent Tavernier
1ed32adafb
Add Rust 2015 edition test for nested modules
2020-04-17 14:22:00 +02:00
Vincent Tavernier
733a19296a
Only keep parse_mod fn
2020-04-17 14:22:00 +02:00