Commit Graph

81 Commits

Author SHA1 Message Date
Jonathan Schwender 927ecd95bf Update documented MSRV 2023-05-31 12:32:35 +02:00
Jonathan Schwender b566c3c064 Fix documented MSRV
The MSRV was updated to 1.54 in commit d4e508d.
Update the MSRV specified in the Readme badge and in the clippy.toml
to match the actual MSRV.
2023-03-08 16:59:28 +01:00
messense cc8cced7e8 Add maturin to examples
https://github.com/PyO3/maturin/blob/190759e804e4d10ff7e2e747c8bd76c17d6ee812/src/module_writer.rs#L461-L498
2022-10-17 09:24:05 +02:00
Andrew Kane a643506874 Add Homebrew instructions to readme [skip ci] 2022-10-11 00:32:43 +02:00
Emilio Cobos Álvarez 88d4b99774 Remove etesync from readme.
Closes #739
2022-03-25 18:42:36 +01:00
Emilio Cobos Álvarez fc4ab1ca55 Remove wgpu-native from users.
Closes #725
2021-12-25 18:56:43 +01:00
Emilio Cobos Álvarez 1264d4c054 Minor metadata updates, rewrap README. 2020-12-21 00:24:24 +01:00
Luni-4 73ea04c2b0 Add badge to README 2020-09-07 00:24:10 +02:00
Tom Hacohen 229b714511 README: add etesync-rs to the example usages 2020-06-12 19:53:33 +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
Igor Sadchenko 5c7a7fca42 Fixed link to wgpu project with cbindgen 2020-05-08 20:07:36 +02:00
Bruce Mitchener 5a66d68e77 Remove extraneous backtick. 2019-07-02 13:50:55 +01: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
Wodann da3bfd3be1 Add cpp_compat option to the README 2019-06-01 10:57:52 +09:00
Emilio Cobos Álvarez 5861271d8e ir: Add the ability to automatically derive copy-constructors for tagged enums. 2019-05-10 20:37:12 +02:00
Emilio Cobos Álvarez 49c056aef4 Make it more similar to the other options. 2019-05-02 19:59:02 +02:00
Emilio Cobos Álvarez 3841c2c30e Fix WebRender generated bindings link, and add stylo.
Fixes #322
2019-04-19 15:38:01 +02:00
Ingvar Stepanyan 67582e3caf Update documentation_style description 2019-04-14 16:20:07 +02:00
Ingvar Stepanyan 944ecb958e Add C99 doc comment style
In modern C (post-C99) it's common to just use `// double-slash comments`, but currently cbindgen provides only `/* block-comment */` and `/// triple-slash comment` variants.
2019-04-14 16:20:07 +02:00
Emilio Cobos Álvarez c6131722dc config: Add an option to make explicit renaming override the prefix setting.
This is useful for opaque types or types cbindgen doesn't otherwise understand.
2019-03-26 13:24:19 -05:00
Ralf Biedert 51aff0a119 Add more documentation style options (#305)
* Ignoring IDE files.

* Addresses issue #302, also amends #59 insofar that vanilla C-style now does not prefix individual lines with `*` anymore.

* Removed Javadoc reference.

* Renamed `Doxylight` to `Doxy` and changed C default to that.

* Added documentation.

* Changed enum name and applied `fmt`.

* Fixed comment.

* Fixed match.
2019-03-24 20:56:17 +01:00
Ryan Hunt 191d8ca917 Add badge for minimum required rustc 2019-02-13 20:58:38 -06:00
Emilio Cobos Álvarez 0a6324f4e6 config: Allow to output user-defined stuff in the struct body. 2019-01-22 18:50:12 -06:00
Dzmitry Malyshau 3e07fe7ffe Add wgpu as a user 2018-11-09 08:43:09 -06:00
Ryan Hunt a4f4d0bf95 Update README.md to reference cbindgen::generate()
Fixes issue #218
2018-10-16 16:24:22 -05:00
Rahul Gurung ad33aae017 added installation 2018-10-01 16:38:47 -05:00
Vincent Esche 6df2fcb316 Added [defines] to sample ‘cbindgen.toml’ file in ‘README.md’ 2018-08-14 00:32:28 -05:00
Basile Clement 7a88f0b6a6 Fix typos in the README 2018-07-31 08:31:43 -05:00
Basile Clement 33c45a26bb Add ability to specify features to use for macro expansion
Currently, `cbindgen` uses the `--all-features` flag when expanding a
dependent crate. However, this may not be desirable in a number of
cases:

 - Some C APIs may be gated by a feature flag and would not be present
   in the final cdylib depending on the features provided (for instance
   one could want to have the ability to build a "debug" version of the
   library which provides extra unstable hooks). In such cases, a
   programmatic `cbindgen` call in a build script would want to use only
   the features that will get used in the current build.

 - Some features may bring in large dependencies and/or potentially
   increase compilation time without affecting the FFI surface, and it
   would be faster and more efficient to disable them when running
   `cbindgen`.

 - Some features may require external libraries and/or hardware (e.g.
   dependencies on GPU libraries such as CUDA) that may not be available
   on the current machine without affecting the FFI surface.

To alleviate this problem, this PR adds an extended version of the
`parse.expand` configuration key, allowing control over the features
used when expanding in a way similar to the way cargo handles extended
dependencies (although note that there is a single version of each key,
since the features refer to the features of the current crate). So for
instance instead of writing `expand = ["euclid"]` one would write:

```
[parse.expand]
crates = ["euclid"]
```

which is equivalent to:

```
[parse.expand]
crates = ["euclid"]
all_features = false
default_features = true
features = ["feature1", "feature2"]
```

Note that `all_features` is set to `false` by default in order to match
cargo's behavior.

For backwards compatibility, the old syntax `expand = ["euclid"]` is
still supported and is equivalent to:

```
[parse.expand]
crates = ["euclid"]
all_features = true
default_features = true
features = null
```

In this case, `all_features` is set to `true` in order to match the
previous behavior of cbindgen.
2018-07-31 08:31:43 -05:00
Emilio Cobos Álvarez c1c0205905 config: Add a configuration option to control which kinds of items are generated. 2018-07-25 13:54:10 -05:00
Philip Jenvey 2bdd534cff fix the docs link 2018-05-18 08:02:00 -05:00
Nikolai Vazquez 256e50e923 Make CLI example more prominent in README.md 2018-04-16 10:11:36 -04:00
Markus Unterwaditzer d8e5ee69ed Add CLI and toml config option 2018-04-05 06:43:21 -05:00
Johan Anderholm 608a67b4b2 Introduce declaration styles on C structs and enums
Allow structs, enums and unions to be declared as:

struct Name {};
typedef struct {} Name;
typedef struct Name {} Name;

Opaque enums will be declared as:
struct Name;
typedef struct Name Name;
2018-03-27 10:05:45 -05:00
Ryan Hunt cc98a02495 Nightly is no longer required 2018-03-12 14:37:47 -05:00
Ryan Hunt e231d9abbe Note the dependency on nightly
Fixes #146
2018-03-09 12:35:37 -06:00
Ryan Hunt ee89f77a37 Update the README for sized tagged enums 2018-01-29 11:51:41 -06:00
Ryan Hunt 60d95258ba Add item renaming, prefixing, force including, and excluding 2018-01-04 23:29:21 -06:00
Ingvar Stepanyan 4ee1a8bcc8 Remove obsolete template specialization 2017-11-18 14:40:42 -06:00
Ryan Hunt fd407f122e Specify the correct helper function 2017-11-14 22:50:43 -05:00
Ryan Hunt cc9c15bbc1 Update README.md to recommend using Builder for build scripts 2017-11-14 22:09:14 -05:00
Ryan Hunt 6b90c00e9c Update documentation 2017-11-14 21:31:58 -05:00
Jeff Muizelaar 68eed64f88 Include a "Prominent users" section 2017-11-14 17:06:51 -06:00
Ryan Hunt 0e47088114 Update README for new features 2017-10-19 00:45:24 -04:00
Ryan Hunt 57bfb90153 Add an explanation of differences between rusty-cheddar and cbindgen
Fixes #48.
2017-09-29 16:02:55 -04:00
Ryan Hunt c436351290 Add rustdoc link 2017-09-29 15:49:56 -04:00
Ryan Hunt 055fdc20da Update the version to 0.1.22 2017-08-17 20:15:33 -04:00
Ryan Hunt 99294d6bda Update the version to 0.1.21 2017-08-12 04:18:04 -04:00
Ryan Hunt 0ca4620192 Update the travis status url 2017-08-01 03:56:02 -04:00