Commit Graph

54 Commits

Author SHA1 Message Date
Andrew Walbran
ed2d06eae3
Update to clap 4. (#2380)
* Update to clap 4.

* Bump MSRV to minimum required by clap 4.

* Mention clap update in CHANGELOG.
2023-01-12 15:37:48 -05:00
Christian Poveda Ruiz
d86db07859
Update README.md 2022-10-24 15:31:02 -05:00
Darren Kulp
87e2e91356 Bump MSRV to 1.57.0 2022-07-18 10:50:15 +02:00
Justin Smith
a1a00434ff Bump msrv to 1.56.1 2022-06-23 16:10:27 +02:00
Mateusz Mikuła
ca78ae9c41 Bump MSRV to 1.54 2022-01-29 11:30:39 +01:00
Anthony Ramine
82462a37a1 Bump cexpr to 0.6 2021-10-13 12:30:30 +02:00
Anthony Ramine
e05a451ba7 Bump cexpr to 0.5 2021-07-19 12:20:49 +02:00
Thomas Vermeilh
c39c47c2e5 Add env var EXTRA_CLANG_ARGS_<TARGET>
Closes #2009
2021-04-15 11:07:41 +02:00
Emilio Cobos Álvarez
ba4312f745
Document that people can request releases
(and I'd be more than happy to make them happen :))
2020-11-13 20:22:27 +01:00
Kyle Mayes
c15355306c Bump MSRV to 1.40.0
The libloading crate is used for runtime linking
and since 0.6.0 it has a MSRV of 1.40.0
2020-08-18 02:39:06 +02:00
Darren Kulp
a492a9ea9d Update some docs that are not changelogs 2020-06-29 03:39:19 +02:00
Travis Finkenauer
93adc70ed8 Document environment variables in README
Mention BINDGEN_EXTRA_CLANG_ARGS and clang-sys variables.
2020-06-08 11:21:14 +02:00
Denis Lisov
c11b780fcb Readme/CI: mention and test the MSRV
Write down the minimal supported Rust version in the README.md and add a
CI test that ensures MSRV bumps cannot happen accidentally.
2020-04-26 18:56:23 +02:00
Lokathor
d2fb021c9e Readme badges 2019-05-06 19:53:30 +02:00
Alex Touchet
a15be7a768 Update Readme 2018-11-24 19:46:35 +01:00
diwic
ef61e7cc96 Update broken links: Rust-lang-nursery => Rust-lang (#1447)
* Fix broken link to user's guide

* rust-lang-nursery => rust-lang

* rust-lang-nusery => rust-lang
2018-11-24 15:36:57 +01:00
Nick Fitzgerald
30d624437b
Match tag line on github in README to downplay implied reliability of binding to C++ 2018-04-03 01:05:14 -07:00
Sergey Pepyakin
badafb6a96 Add links to impl period blog post and gitter.im 2017-09-21 20:04:10 +03:00
Nick Fitzgerald
167e84cea2 s/servo/rust-lang-nursery/ in README.md
Missed the most important part of the last commit... r=me
2017-07-25 17:39:48 -07:00
Nick Fitzgerald
cfdcda6f91 11/10 MAJESTIC AF 2017-07-13 14:44:27 -07:00
Nick Fitzgerald
2d20e7e8ef Add the bindgen Users Guide
This commit adds a Users Guide, built with [mdbook][] (the same tool used
by *The Rust Book*).

It moves all the user documentation from the README.md into the Users Guide. It
leaves the README.md as a splash page featuring an example of what `bindgen` is
and does, a link to the Users Guide, a link to the docs.rs/bindgen API reference
documentation, and a link to CONTRIBUTING.md.

It ensures that the Users Guide builds with `mdbook`, and all code snippets
within it build as doctests and pass, on every CI run.

Finally, it builds and uploads the Users Guide every time CI passes on the
master branch.

[mdbook]: https://github.com/azerupi/mdBook
2017-04-26 18:05:24 -04:00
Simkha
839e97768a fix clang installation instruction for debian os 2017-03-07 13:15:01 +06:00
Rafael Bachmann
f63ed7cce6 Clarify/correct command line usage
cargo installs bindgen to the local bin repo and not the current directory.
2017-02-09 16:33:43 +01:00
Alexander Altman
56d49379f4 Add missing highlighting language annotation 2017-01-23 12:26:23 -08:00
bors-servo
793a74f6c0 Auto merge of #419 - fitzgen:cargo-metadata, r=emilio
Small cargo and docs clean ups

r? @emilio
2017-01-23 11:04:52 -08:00
Nick Fitzgerald
28a3784b77 Expand documentation about C++ bindings generation 2017-01-23 10:57:22 -08:00
Nick Fitzgerald
287c560111 Recommend using bindgen with build.rs in the README 2017-01-23 10:50:46 -08:00
Nick Fitzgerald
1fdc79adc8 Re-run doctoc to update README's table of contents 2017-01-23 10:20:51 -08:00
Emilio Cobos Álvarez
aad93a81bb
Breaking version bump. 2017-01-23 10:23:09 +01:00
Emilio Cobos Álvarez
b83da2729f
Unify under the bindgen name. 2017-01-23 10:22:08 +01:00
Nick Fitzgerald
78235aa0e0 Move the building instructions from README.md to CONTRIBUTING.md 2017-01-19 11:47:48 -08:00
Nick Fitzgerald
0409c2cb10 Clean up the README.md and CONTRIBUTING.md docs
Use the `doctoc` program to generate tables of contents, stop referring
to forking and make this the canonical `bindgen`, move the section on
building to last.
2017-01-19 11:36:32 -08:00
Xidorn Quan
a65e825e86 Update README.md to reflect the current situation
There are several changes:
* Announce that Clang 3.9 is the new default
* Update the install steps for 3.9
* Add installing steps for Windows
* Update stylo's usage of bindgen
2016-12-28 23:37:01 +11:00
Xidorn Quan
3f711d85e7 Fix issues in README
Mainly for fixing `env!("OUT_DIR")` usage in `build.rs`.
2016-12-12 13:48:58 -10:00
Ting-Yu Lin
d1e97eaf1b Restore links in README.md
These were deleted accidentally in 073b12ff35.
2016-11-26 23:10:27 +08:00
Jeff Waugh
073b12ff35 Remove plugin and its documentation 2016-11-16 05:31:08 +11:00
Jeff Waugh
c555fcf76a Document library usage 2016-11-16 05:31:08 +11:00
Ting-Yu Lin
20b6a6f799 Fix link to stylo script in README.md
The scripts were moved in
https://github.com/servo/servo/pull/13372
2016-11-04 00:03:31 +08:00
catdesk
02b50cc91c Add link to setup LLVM repos on Debian/Ubuntu. 2016-10-29 14:31:45 +02:00
Nick Fitzgerald
1c9ad3ef36 Add a CONTRIBUTING.md file
It provides an overview of how to file a helpful issue and how to run tests.

Fixes #93
2016-10-21 15:11:52 -07:00
Emilio Cobos Álvarez
1a04499d11
Add documentation for building with ports and LLVM 3.9
Fixes #64.
2016-09-27 14:41:41 +02:00
Nick Fitzgerald
65144eb751 Add description of how to run the tests to README.md
Fixes #42
2016-08-25 13:24:54 -07:00
Nick Fitzgerald
aaaf4f774a Make sure to mention the need to checkout and build clang 2016-08-22 15:42:47 -07:00
Nick Fitzgerald
ca412c6b32 Expand the build instructions when using llvm 3.9 2016-08-22 15:28:37 -07:00
Emilio Cobos Álvarez
3f9166989b
readme: Add a bit more up-to-date information. 2016-07-01 16:56:29 -07:00
Ms2ger
cffef57f98 Correct the README on the rustbindgen attribute. 2016-07-01 17:04:10 +02:00
Michael Wu
ab10295699 SM hacks squash
Generate better enums

Squash of...

Disable prefixing

Default to failing on unknown types

Add support for Char16

Emit errors for unknown cursor kinds

Hack in support for classes

Recurse into unexposed decls

This fixes functions that use extern "C".

Add support for generating unmangled functions

Prefix unnamed data structures with the file name

Recurse into namespaced things

Avoid rust reserved keywords in unmangle func args

Don't create variadic unmangled funcs

Don't translate typedefs to the same name

Ignore operator overloads

Avoid templates

Handle class declarations

Number duplicate demangle functions

Implement copy on enums

Translate stdint types into standard rust int types

Switch enums to i32 for better compatibility

Correctly deal with mangled functions with unnamed args

Mark unmangling functions as unsafe

Attempt to produce structs for C++ classes

Convert references

Generate better func decls for void returns

Make every function callback unsafe

Add support for generics in typedefs

Add support for class templates

Aggressively trim duplicates

Don't generate default impl for templates

Improve handling of templates

Fix function numbering

Fix deduplication

Make unmangling functions extern "C"

Convert all int/float typedefs to standard rust ints/floats

This also gives better information to the bitfield parsing and allows uint32_t and other stdint bitfields to be processed properly

Add support for wchar

Add support for bitfield setter generation

Fix floats

Squash of...

Shorten generated bitfield names

Add support for generating whole bitfields

Add support for enums nested inside structs/classes

Rustup

Fixes #184.

Rustup to b301e02f3 2015-05-19

Inline demangling functions

Add support for base classes/types

Generate bindings for methods

Make duplicate detection less aggressive

Avoid converting long/unsigned longs to rust types.

This fixes 64/32bit issues in structs.

Generate bitfields correctly for typedefs

Convert stdint types to rust types

Derive Debug on BindgenOptions, Bindings, and LinkType.

Remove +'static when writing bindings

Generate virtual function tables

Resolve some warnings

Add NotConst where Constness params are required

Generate real bools when applicable

Squash of...

Add support for comments

Improve bitfield support using const fn

Add limited support for references

Add comments to fields

Don't generate empty comments

Convert char16_t to u16 rather than i16

Convert signed chars to libc::c_char

Fix Cargo.toml rebasing breakage

Fix compiler errors

This gets bindgen to compile and run again, but all but one `cargo
test` tests fail. Not sure if that’s because of mistakes on my part or
if the sm-hacks branch never passed those tests.

Fix build warnings

Use link_name attr for mangled function names

Handle mangled global vars

Only generate bindings for visible symbols

Don't generate arrays for blobs when the length is 1

Name enums inside classes better

Handle template args inside typedefs better

Filter out duplicate decls better

Generate correctly sized enums

Squash of...

Fix bitfield accessor method generation for bools

Insert phantom fields in empty structs

Don't mark unmangling methods as extern "C"

Add back comment support for functions

Add basic annotation support

Don't generate univariant enums

Add support for hide annotation and adjust syntax

Don't generate unsupported structs

Don't parse hidden fields

Don't derive Copy for structs with destructors

Don't implement Clone or Default

Derive Clone when deriving Copy

Bypass single member unions

Disable references in function args for now

Remove extra underscore in mangled names on OSX

Don't translate private methods

Support generating consts from macros that are defined as integer literals.

Handle mangling better

Squash of...

Update README.md for fork

Generate docs for enum items

Generate docs for typedefs

Generate docs for enums

Update syntex_syntax to 0.24.*

Update clang info in README.md

Spit errors and warnings to stdout.

The correct thing to do here is to use env_logger, but that was causing cargo
troubles for me, and this is preferable to swallowing them.

Add the -ignore-functions argument.

Handle 1 << 63 as enum value.

Don't try to convert standard int types in rust_type_id.

It looks like mwu added this, but I'm pretty sure it's a category error. This
function appears to be designed to reproducibly permute C identifiers so that
they don't conflict with builtin rust types. It's specifically _not_ a type
translator (which would happen at the type level, rather than the string
level), and using it as such with callers like ctypedef_to_rs causes us to
generate things like:

type u64 = u64;

While processing stdint.h, which is clearly wrong.

Stop patching in placeholder names for CompInfo and EnumInfo instances during code generator.

As best as I can tell, it's done this way (rather than my way) because bindgen tries
to recognize struct and enums typedefs of the form:

/* This is a common idiom in C, not so much in C++ */
typdef struct {
 ...
} Foo;

The intention, I think, is to avoid generating rust code for a struct with a placeholder
name followed by a typedef, and just give the struct the right name initially.

This seems like a reasonable goal, though not a particularly important one. However, in
my testing this never actually happens, because we end up calling unnamed_name anyway
during the GComp(ci) case of gen_mod before we get to evaluting the typedef.

So let's just remove that stuff and simplify the code. This lets us remove all the
borrow_mut calls during code generation, which seems necessary for soundness.

gen: Allow empty union members

Use full paths in generation.

Fix test compilation

parser: Add support for parsing namespaces

Partial C++ namespaces support

We currently generate the modules as expected, but we don't resolve the
names from external namespaces well.

Remove unnecesary return statements

Put namespaces behind a flag

Overall now that they aren't complete still.

Moar refactoring

Finally take rid of all the warnings

Even moar

gen: Avoid so much cloning

parser: Refactor the way submodules are stored

This way we can share the global map, while having each module custom
globals.

gen: Checkpoint before the refactoring

This actually keeps working as before.

gen: Make modules (almost) work for typedef'd types

We generate almost valid code, we just have to add some use statements.

Or maybe is a better idea to add an unintelligible name to the root
mod, and actually output a root mod plus a use root::* before.

gen: Document the current submodule approach and some desirable
alternative

gen: Make it actually compilable \o/

gen: Make the code generation usable for every type.

There's just an edge case I've detected, and it's when we remove the
instantiation of C<int>, and another module uses it, because that means
we only know of its existance in that other module.

Probably we might want to use cursor_getSemanticParent to get the real
class instead of the instantiated, but I'm not too confident about that.

Fix a corner case when a template was instantiated in another module.

Added an example of the namespace resolution.

Don't panic when not finding the specialised template

This can be annoying if filtering files out.

Straight rebase completed, let's fix that build errors

wip

Pair up with master

nits

Update AST

Add -no-rename-fields option

This is for compatibility between C bindings and C++ bindings (in C
`struct Foo` and `enum Foo`, are different, while in C++ they aren't).

wip

Add enum tests pass, and add C++ tests

Make a few more struct-related tests pass
2016-03-16 23:24:22 +01:00
Yamakaky
9df67c2fde Add links to README icons. 2016-03-12 09:56:56 +01:00
Benedikt Steinbusch
873add4858 Add shields to README.md. 2016-03-12 00:46:13 +01:00
David Boon
2784b84d4d updated documentation with location of libclang when only command line xcode installed. 2015-06-03 06:45:52 -07:00