summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-01-23 11:04:52 -0800
committerGitHub <noreply@github.com>2017-01-23 11:04:52 -0800
commit793a74f6c0a3369e8011502b6324396b6b4d021c (patch)
tree7c63e735a4d802e997a89765acb9fb3e2e1a1db6 /README.md
parentd593dff1e914b7ceb62aa1b0480d9828bbb24b38 (diff)
parent28a3784b778e5d10ce492d8434aa7b489615452d (diff)
Auto merge of #419 - fitzgen:cargo-metadata, r=emilio
Small cargo and docs clean ups r? @emilio
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 15 insertions, 1 deletions
diff --git a/README.md b/README.md
index 8cd2d96e..545c917b 100644
--- a/README.md
+++ b/README.md
@@ -87,6 +87,8 @@ Those instructions list optional steps. For bindgen:
### Library usage with `build.rs`
+💡 This is the recommended way to use `bindgen`. 💡
+
#### `build.rs` Tutorial
[Here is a step-by-step tutorial for generating FFI bindings to the `bzip2` C library.][tutorial]
@@ -153,11 +155,23 @@ There are a few options documented when running `./bindgen --help`.
### C++
-This fork of rust-bindgen can handle a number of C++ features.
+`bindgen` can handle most C++ features, but not all of them (C++ is hard!)
+
+Notable C++ features that are unsupported or only partially supported:
+
+* Partial template specialization
+* Traits templates
+* SFINAE
+* Instantiating new template specializations
When passing in header files, the file will automatically be treated as C++ if
it ends in ``.hpp``. If it doesn't, ``-x c++`` can be used to force C++ mode.
+You must use whitelisting when working with C++ to avoid pulling in all of the
+`std::*` types, some of which `bindgen` cannot handle. Additionally, you may
+want to blacklist other types that `bindgen` stumbles on, or make `bindgen`
+treat certain types as opaque.
+
### Annotations
The translation of classes, structs, enums, and typedefs can be adjusted using